Saravanan666/pypi-org huggingface dataset:
Package: gpw
by Wicher Minnaard <wicher@gavagai.eu> <http://smorgasbord.gavagai.nl>This is public domain software.Difference with gnuplot-py: This module does not need numpy. Also, this module
doesn’t offer tight integration with gnuplot.The main problem this module solves is that gnuplot needs a) data, b) instructions, and generates c) graph output. a) comes from files, b) can be fed in stdin, and c) can be written to stdout and used in your Python code.For instance, you may want to feed data from Python into gnuplot according to
some dynamically generated instructions, catch some SVG back in a Python string, and push that out over HTTP without messing with temporary files.But if you want to feed _data_ from Python into gnuplot, then you must use temporary files because stdin is reserved for instructions.This module employs filesystem FIFOs and doesn’t write data to disk.This version works with Python 2.7 and 3.1+.
Package: gpwebpay
gpwebpayGPWebPay Gateway access with Python.This library is meant to be used by merchants that own a webshop and use GpWebPay as its payment gateway.
At the moment there are code examples for using GPWebPay in a webshop with PHP, where developers can see how to
sign and verify messages exchanged with the payment gateway.With this package you can also do it in Python and you can find an example of its usage in a webshop in thedemoshop repositoryConfigurationEnvironmental variables needed:GPWEBPAY_MERCHANT_ID = "0987654321"     # Your merchant's id from gpwebpay
GPWEBPAY_MERCHANT_PRIVATE_KEY = ""      # Your merchant's private key base64 encoded (cat gpwebpay-pvk.key | base64 -w0)
GPWEBPAY_PUBLIC_KEY = ""                # GPWebPay's public key base64 encoded (cat gpwebpay-pub.key | base64 -w0)
GPWEBPAY_RESPONSE_URL = ""              # The url for the callbackOptional:GPWEBPAY_CURRENCY = "978"                       # If not set EUR is the default currency
GPWEBPAY_DEPOSIT_FLAG = "1"                     # Requests instant payment
GPWEBPAY_MERCHANT_PRIVATE_KEY_PASSPHRASE = ""   # If anyTo use this package create a GpwebpayClient:importbase64importosfromgpwebpayimportgpwebpaygw=gpwebpay.GpwebpayClient()# Get your merchant's private keyprivate_key=os.getenv("GPWEBPAY_MERCHANT_PRIVATE_KEY")# Decode your private key with base64private_key_bytes=base64.b64decode(private_key)# Call this method to request a payment to GPWebPay.# Returns a response, redirect to response.url to go to GPWebPay's and make the payment# The order_number needs to be unique and the amount in cents.gw.request_payment(order_numer="123456",amount=999,key=private_key_bytes)# Get GPWebPay's public keypublic_key=os.getenv("GPWEBPAY_PUBLIC_KEY")# Decode it with base64public_key_bytes=base64.b64decode(public_key)# Call this method to verify the response from GPWebPay# You need to pass here the url you received on the callback# Its querystring contains the data to verify the messagegw.get_payment_result(url,key=public_key_bytes)For more details refer to theGPWebPay documentationTestsTo run the tests:pytestDevelopmentWe use poetry to manage dependencies, packaging and publishing.
If you want to develop locallyinstall poetryand run:poetryinstall
Package: gp-wrapper
gp_wrapper v=0.9.8A Google Photos API wrapper libraryOfficial API is already supportedWhat does this package offer?Support for all of the official API and more convenience function as well.
A-lot of well defined API inspired Classes and Enums to simplify the usage.GooglePhotosclass - wrapper over authenticated HTTP sessionAlbumClass - handles all of the global and instance methods for an AlbumMediaItemClass - handles all of the global and instance methods for MediaItemEnums:RequestType,HeaderType,MimeType,PositionType,EnrichmentType,MediaItemMaskTypes,AlbumMaskType,RelativeItemType,StatusCodeClasses:SimpleMediaItem,NewMediaItem,AlbumPosition,Status,MediaItemResult,MediaMetadata,ContributorInfoQuick StartCreate aGoogle Cloud ConsoleprojectEnable google photos APIhereFill informationhereFill application name and detailApply scopeshttps://www.googleapis.com/auth/photoslibrary,https://www.googleapis.com/auth/photoslibrary.appendonlyhttps://www.googleapis.com/auth/photoslibrary.sharinghttps://www.googleapis.com/auth/photoslibrary.edit.appcreateddataAdd a google account as a Test User which will be able to use you project as an 'end user'Extract relevant data forclient_secrets.jsonpip install gp_wrapperSee examplehere
Package: gpx
PyGPXPyGPX is a Python package that brings support for reading, writing and converting GPX files.InstallationFrom PyPIPyGPX is available onPyPI. Install withpipor your package manager of choice:pipinstallgpxFrom sourceIf you'd like, you can also install PyGPX from source (withflit):gitclonehttps://github.com/sgraaf/gpx.gitcdgpx
python3-mpipinstallflit
flitinstallDocumentationCheck out thePyGPX documentationfor theUser's GuideandAPI Reference.UsageReading a GPX file>>>fromgpximportGPX>>># read the GPX data from file>>>gpx=GPX.from_file("path/to/file.gpx")>>># print the bounds of the GPX data>>>print(gpx.bounds)Manipulating GPX data>>>fromgpximportWaypoint>>>>>># delete the last waypoint>>>delgpx.waypoints[-1]>>>>>># add a new waypoint>>>wpt=Waypoint()>>>wpt.latitude=52.123>>>wpt.longitude=4.123>>>gpx.waypoints.append(wpt)Writing a GPX file>>># write the GPX data to a file>>>gpx.to_file("path/to/file.gpx")
Package: gpx2kml
gpx2kmlgpx2kml is a library for combininggpxfiles exported fromRunkeepertokmlfiles. Below is a screenshot of the generated kml file in Google Earth.IntroductionRunkeeper is one of many mobile apps that can track exercises. Usually they provide UI for displaying individual activity (like biking, running, etc.) with route map and statistics, and the functionality to bulk export archive files.gpx2kml can combine all the gpx files exported from Runkeeper into a single kml file so that it can be displayed in the Google Earth. The motivation is mainly to prepare data for mybike journey webpage.User scenarioI use Runkeeper to track my biking and walking activities. Tracking is a long term activity, so file generation and archive is an incremental process.I export the gpx files once per month, and generate kml files from the gpx files with the format YYYY-MM.kml. After that, all the kml files are combined into a single kml file, usually named after the city or the event related with those activities.Installationpip install gpx2kmlHow to use itAccumulate a few activities using Runkeeper.Export the acitivesfrom the Runkeeper web UI and download the file. The demo folder provides a sample zip file.Open a terminal, and change the working directory to the one that contains the zip file.Rungpx-archivein the terminal. This will create anarchivefolder under the working directory, with all the gpx files inside.gpx-archiveRunkml-genin the terminal. This will create akmlfolder under the working directory, with the generated kml files organized by month.kml-genRunkml-combine XXXin the terminal. This will create a `XXX.kml`` file that includes all the kml files in the kml folder.kml-combine XXXOther than running the commands in the terminal, there is a demo.py that demonstrates how to call the methods in a python file.
Package: gpx-analysis-edf1101
Rowing-GPX-AnalysisIntroductionGPX Analysis for rowing written in Python with a tkinter matplotlib interfaceWhy?I couldn't find the code for the old GPX analysis tool I wrote, so I'm taking the
opportunity to build a better/ more robust one.PrerequisitesPython RequirementsPython 3.11+Numpypip install numpyMatplotlibpip install matplotlibtkScrolledFramepip install tkScrolledFramePillow (should already be installed with mpl)pip install pillowGiven it downloads map images from online it requires an internet connection to run.InstallationFor Standard users go to the GitHub page and download from releasesFor Developers you can clone the repository, install the requirements and run as you wish.It can also be installed withpip install gpx-analysis-edf1101and run from command line withpython -m gpx_analysisGetting Started & NotesFor instructions on how to use please view theGetting started pageon the project's GitHubOn python due to tkinter bug workarounds it doesn't exit the application when you close the window, you will have to force quit it.DetailsThe project is hosted online athttps://github.com/edf1101/Rowing-GPX-AnalysisLicense & PoliciesThis project is licensed under the MIT License - see theLICENSEfile for detailsThe only exception to this is the example data, which should not be used elsewhere.Code in graph_handler.py to fetch images from tile servers should be used with caution to make sure you comply with the
terms of service of the tile server you are using.
Package: gpx-csv-converter
GPX to CSV ConverterA handy tool for converting GPX files exported from Strava, WatShout, etc into easily readable CSV filesI made this tool to make it easier to perform calculations on large amounts of GPX data collected from a GPS.
Rather than manually copy and paste files into an Excel spreadsheet this module simple inputs the GPX file and exports a CSV file.FormatFor now the module exports the following GPX tags to the CSV file:TimestampLatitudeLongitudeElevationHeart RateUsageInstall module using pippipinstallgpx-csv-converterImport module within Python filefromgpx_csv_converterimportConverterConverter takes two keyword arguments, 'input_file' and 'output_file'Converter(input_file="input.gpx",output_file="output.csv")This will output a CSV file to the current directorySupportIf you have any questions or concerns please shoot me an email atethan.houston@gmail.comhttps://pypi.org/project/gpx-csv-converter/
Package: gpxfix
gpxfixA small python-based GUI that helps you reestablishing broken GPX-files.When can this be useful?It's a common issue for every sportsman who loves recording activities. Your device runs out of battery before you come back home, you forgot to start the record when you left home or, even worse but a frequent problem in older iPhones, you lost GPS signal somewhere on the track for a couple of minutes.
Then, checking out your track, you see straight lines or the first/last bit is completelty missing.Installationgpxfixships viapypi:pipinstallgpxfixAfterwards, just typegpxfixto start the UIUsage instructionIf you run the file, the default windofw of the GUI shows up:You see a couple of options here, the first step should be to upload your GPX fileYou get a confirmation message once the file has been parsed successfullyPressShow Tracking Mistakesto let the algorithm find the missing sections in your file. Per default a tracking mistake is defined as not having recorded a GPX trackpoint for at least5 secwith you having moved at least400m. I find this okay for cycling but you can change these parameters at the beginning of the code.A window pops up saying"Great! No error has been found."This means, your file itself is consistent, but you may want to insert something at the beginning or at the end. To do so, please click on the respective link which directs you to Google Maps. Then you simply have to tell Google where you started/ended your trip.Otherwise, you get an overview of the found errors, i.e. the program displays you the coordinates of the last trackpoint before and the first trackpoint after the missing spot. Now, assuming you want to fill in this gap in your GPX file, please select the number of the error from the dropdown and clickGO!to instruct GoogleMaps to find the shortest path between the 2 trackpoints. Default vehicle is bicycle. Now you can set easily adjust this snippet such that it fits the route you actually took.**NOTE: In this window you determinewhereyour snippet will be inserted. ** If you want to insert a snippet at the start click "I miss the start of my ride". If you dont selectanythinghere, the program will not knowwhereto insert your snippet and fail later.Now, we want to merge the snippet we just created with the broken track we recorded. For this, we use a nice tool calledmapstogpx. Past the link from the Google Maps snippet you just created and download the file (make sure you to tickAdvanced Settings -> Include Elevationbefore downloading). Please also make sure to remember the distance of the snippet (according to Googe Maps).Tell the program where you saved the snippet viaUpload GPX fragment.You have to fill in the distance of the fragment that you want to merge (for some reason,gpxpy.geo.haversine_distancebehaves a bit erratically and consequently speed estimation is imprecise). Then pressOKand thenRepair!Hopefully, everything went through and the repaired file was saved in the directory "Corrected Files"If you have multiple issues with your GPX file, just repeat the procedure.Feel free to fork and please report any issues.
Package: gpx-linesman
linesmanlinesmanis a small python command line tool calculating quality measures for
the straightness of a gpx track. The project is inspired by the "I attempted to
cross <country> in a completely straight line" series of youtuberGeoWizard.InstallationAs apythonpackage,linesmanis installedwith
pip. The
package is namedgpx-linesman:pip install gpx-linesmanAfter installing the package, you should be able to run linesman:linesman --helpUsagelinesmanmust be passed a gpx file with the recorded track and a quality
measure that shall be used to compare the gpx track against the reference line:linesman path/to/file.gpx <measure>Currently, the following quality measures are implemented:MAX: maximum deviation from the reference line in metersAVG: average deviation in metersSQ-AVG: squared deviation average in metersDevelopmentPython dependencies are managed with poetry and can be installed frompoetry.lockby running:poetry installThen, the CLI tool can be started withpoetry run linesman. Run tests withpoetry run pytest.DocumentationConceptual documentation can be found onreadthedocs.
Package: gpx-lite
gpx-liteSimple parser for gps tracks, based onhttps://pypi.org/project/gpxpy/Gpx-lite is a simplified version of gpxpy, aimed to load and save data about gpx tracks, segments,
and points from/to xml, including large .gpx files, quickly enough.Parser only collects data from trk, trkseg, and trkpt gpx tags. All other tags are ignored.
Resulting GPX structure contains track list - list of track segments made of track points with latitude,
longitude, and time.For more information seehttps://github.com/aicenter/gpx_lite/wikiPrerequisitesPython 3.4 or higherTyping 3.6.2Installationpip install gpx-lite
Package: gpxplotter
gpxplottergpxplotteris a Python package for readinggpxfiles and creating simple predefined plots usingmatplotliband maps usingfolium.Please seehttps://gpxplotter.readthedocs.io/en/latest/for the latest documentation and theBinder notebooksfor examples.Installationpip install gpxplotterExamplesInteractive examples can be explored
viaBinder.Simple example for showing a track in a map, colored by heart ratefromgpxplotterimportread_gpx_file,create_folium_map,add_segment_to_mapthe_map=create_folium_map()fortrackinread_gpx_file('ruten.gpx'):fori,segmentinenumerate(track['segments']):add_segment_to_map(the_map,segment,color_by='hr')# To display the map in a Jupyter notebook:the_mapFurther examplesPlease see thegallery in the documentationfor further examples.
Package: gpxpr
gpxprGPX file parser and renderer.InstallationFrom PIPpipinstallgpxprManualgit clone https://github.com/Kruhlmann/gpxpr
cd gpxpr
make installUsageusage: gpxpr [-h] -r RENDERER -w WALKING -v RUNNING -a {time,distance} [-o DESTINATION] target

positional arguments:
  target                File to process

optional arguments:
  -h, --help            show this help message and exit
  -r RENDERER, --renderer RENDERER
                        Renderer to use [stdout, matplot]
  -w WALKING, --min-walking-speed WALKING
                        Slowest min/km where a runner is considered 'walking'
  -v RUNNING, --min-running-speed RUNNING
                        Slowest min/km when a runner is considered 'running'
  -a {time,distance}, --aggregation-value {time,distance}
                        Value to base the aggregation on
  -o DESTINATION, --output DESTINATION
                        Output location. Default is /dev/stdoutDevelopingWindowsThe recommended way to develop on Windows is the make use of theWindows Subsystem for Linuxand then referring to the UNIX-like section.UNIX-likeAuto-running tests on code change is achievable withentrfindsrctests-name"*.py"|entrmaketestSimilarly for linting on file change:findsrctests-name"*.py"|entrmakelint
Package: gpx-reader
gpx_readerA tool to read GPX files and rename the files according to the location and time of the track.usageto rename your .gpx filesimport the function rename:from gpx_reader import rename.call the function, with the argument the folder containing the files as the first argument, and the folder where to write the new files as second argument:rename('input_files', 'output_folder')optionally, set the keyword argumentmove=Truein order to delete the files after being processed:rename('input_files', 'output_folder', move=True)
Package: gpxrecords
About programEasy way to process a bunch of .gpx logs to get best times on selected distances.InstallationPython3 is required. Download latest version for your OS fromhttps://www.python.org/downloads/and install it.After that, open console (for Windows users, it can be found in Accessories folder of the Start Menu) or terminal (for Linux users).Execute following commands:pip3 install setuptools
pip3 install gpxrecordsUsageOpen console (or terminal) and execute:gpx-recordsSeveral windows will be appeared in the following order:folders selections: specify directories where your .gpx logs are stored;logs selection: select logs you want to analyze;distances selection: specify distances and number of attempts for each distance;After processing, table will be shown with following columns:Distance. Two types of distance is shown here: distances with best times in the current log (simple number, i.e. 100), and distances with zero start speed (100zs, for example).Time;Average speed;Time from start: location of the distance in the log;Distance from start: location of the distance in the log;Actual distance. Due to large GPS sampling time actually logged distance fits required size in very rare cases, so recalculating method is used for required distance time calculation. See more in Accuracy chapter of this manual.In the end of the table absolute records for processed logs is given.All records and settings are stored in .gpx_records directory of your home directory or user folder for Windows.AccuracyGPS is not very accurate method for distance measurement, so some best practices are recommended:Use special GPS trackers. Smartphone log quality is often very poor;Use high sampling rate: 1 sample in second, for example is good enough for accurate results;Do not hide GPS tracker deep inside your bag.If you use smartphone applications, such as Strava and Runtastic, be very careful, when use this program for short distances analysis. These applications can turn on autopause feature for log compression purposes (even if user didn't selected it), so first several seconds of the log can be missed. Be critical to given results and don't be too proud if you occasionaly "beat" world record on your moring jogging.Quality of the log can be indirectly estimated by "Actual distance" field of the table. Difference between actual and required distances don't have to be too large since large difference usually is the sign of GPS failure and leads to large inaccuracy in time calculaton.Time is recalculated by following formula:time = actual_distance_time * distance / actual_distance
Package: gpxslicer
gpxslicergpxslicer slices GPX tracks at a given interval or at a list of provided cut points.InstallationThe best way to install gpxslicer is via pip:pip install gpxslicer. You can alternatively install it from the source code:python setup.py install.UsageCommand linegpxslicer is primarily intended to be used as a command line tool (with support for redirection and piping data in/out).gpxslicer -i in.gpx -d 5000 > out.gpxwould, for example, take the tracks ininfile.gpx, split them at every five kilometers, then pipe the results intoout.gpx.Full description of command line options:flagcommanddescription-h--helpShow the help.-i--inputSpecify the input GPX file with tracks to be sliced.  If not given, input is read from stdin.-o--outputSpecify the output GPX file. If not given,  input is written to stdout.-d--distanceSlice tracks at every DISTANCE meters.-e--externalSlice tracks at waypoints found in EXTERNAL file.-w--waypointsSlice tracks at waypoints found in INPUT.--no-tracksDo not store sliced tracks in the output. Useful when slicing using-dand only the cut points are of interest.--no-waypointsDo not store cut points in the output. Useful when slicing using-eor-wso the points are already (approximately) known.-q--quietlyDo not display status messages (that are normally sent to stderr).Slicing at intervalsWhen using-d, gpxslicer goes through each track and track segment separately (always restarting the distance counter when a new track or track segment starts in the input file).Cut points are not interpolated but chosen from available points on the track. Therefore, if there are very few points in the track or the chosen interval is small, there can be a significant variation in the actual length of the cut segments. There should be no major problems with sufficiently many track points and large slice distances.Slicing at waypointsWhen using-eor-w, gpxslicer uses theget_nearest_locationmethod from the GPX class of gpxpy. This finds the point of the tracks stored in the input file that is closest to the given slice point, and then splits the track there. Finally, it duplicates this point into the new track to prevent a gap. When the slice points are very far from the track, there can be unexpected or insensible results.Note that all waypoints in the gpx file will be used, so any unnecessary waypoints should be removed beforehand.Python packageThe two main functions,slice_gpx_at_points()andslice_gpx_at_interval()can be accessed byfromgpxslicerimportslicerslicer.slice_gpx_at_interval(gpx_data,interval)slicer.slice_gpx_at_points(gpx_data)Detailed documentation of these functions can be found in the code.More infoRead more about this package, including the motivation to write iton my blog.