Saravanan666/pypi-org huggingface dataset:
Package: gmail-wrapper
Gmail WrapperBecause scrapping Gmail data doesn't have to be apain.Installingpipinstallgmail-wrapperDevelopingCreate yourvenvvirtualenv.venvsource.venv/bin/activateThen you can install the dependenciespipinstall-e.TestingSimply runmaketestBasic UsageSetup the clientfromgmail_wrapperimportGmailClientemail_account="john.doe@gmail.com"credentials_string="{...}"# You must generate this on your Google accountscopes=[GmailClient.SCOPE_READONLY]client=GmailClient(email_account,secrets_json_string=credentials_string,scopes=scopes)Fetch messagesimportsysquery="filename:pdf label:friends"# Check Gmail query docs: https://support.google.com/mail/answer/7190messages=client.get_messages(query=query,limit=10)formessageinmessages:print("-- MESSAGE{}--".format(message.id))print("SUBJECT:{}".format(message.subject))print("DATE:{}".format(message.date))forattachmentinmessage.attachments:print("\t-- ATTACHMENT{}--".format(attachment.id))print("\t\tFILENAME:{}".format(attachment.filename))print("\t\tDECODED SIZE:{}".format(sys.getsizeof(attachment.content)))Modify message labelsIf a single message:message_id="..."message=client.get_message(message_id)print(message.labels)# ["foo", "bar"]message.modify(add_labels=["processed"],remove_labels=["foo"])# Beware that you'll need proper scopesprint(message.labels)# ["bar", "processed"]If multiple messages:message_ids=["...","..."]message=client.modify_multiple_messages(message_ids,["processed"],remove_labels=["foo"])Archive a messagemessage.archive()# Beware that you'll need proper scopesSend messagecontent='''<html><h1>Hey there</h1><p>I am using gmail-wrapper lib!</p></html>'''message=client.send(subject="You will like it",html_content=content,to="thanos@loadsmart.com",cc=["iron.man@loadsmart.com","spider.man@loadsmart.com"],bcc=["wolverine@loadsmart.com"])# Beware that you'll need proper scopesprint(message)# Gmail message: ABC123Reply messagemessage_id="..."message=client.get_message(message_id)reply='''I am out for vacation, will return <strong>Jan 14</strong>.If it is really important, you can call me, but think twice.'''response=message.reply(reply)Handle exceptionsExceptions are part of every developer day-to-day. You may want to handle exceptions as follows:fromgmail_wrapper.exceptionsimport(MessageNotFoundError,AttachmentNotFoundError,GmailError,)try:do_something()exceptMessageNotFoundErrorase:print(f"There is no message!{e}")exceptAttachmentNotFoundErrorase:print(f"There is no attachment!{e}")exceptGmailErrorase:print(f"Google servers are burning!{e}")DisclaimerGmail is a trademark of Google. This open-source project isnotan official library nor has any endorsement of Google.
Package: gmaily
gmailyUnofficial Gmail python client with pythonic API.FeaturesClean APINo other dependencies than standard libraryLazy loading for contentExampleimportsysimportgetpassimportdatetimefromgmailyimportGmailyg=Gmaily()user_email=input("Email: ")user_pw=getpass.getpass()ifnotg.login(user_email,user_pw):print("Cannot login")sys.exit(1)msgs=g.inbox().after(datetime.date.today()-datetime.timedelta(weeks=2))formsginmsgs.all():print("\n"+(" Mail UID:%d"%msg.uid).center(80,"=")+"\n")print("Subject:",msg.subject)print("From:",msg.sender)print("Date:",msg.date)print("Attachments:",msg.attachments)print("-"*10)print(msg.text)g.logout()UsageSearching MailboxSearchQuery, which is returned by some methods likeGmaily.inboxsupports method chaining and you can easily mix search criterias together:two_weeks_ago=datetime.date.today()-datetime.timedelta(weeks=2)msgs=g.inbox().by("john@example.com").before(two_weeks_ago)Alternatively, you can use other mailboxes thanINBOXin the above example
usingGmaily.mailboxmethod:msgs=g.mailbox("URGENT").on(datetime.date.today())You can then execute the query and fetch the results usingSearchQuery.all:print(msgs.all())You can find the full list of supported criterias and their description athere.
Note thatALLcriteria is not present because it's the default criteria
andSearchQuery.allstands for executing the query.
Any other names like.fetch(),.do()could be taken the place,
but I chose the.all()because famous ORMs use it too.Some other criterias are omitted too:NOTORUIDInstallationIt requiresPython>=3.5.$ pip3 install -U gmailyLicenseMIT
Package: gmail-yaml-filters
gmail-yaml-filtersA quick tool for generating Gmail filters from YAML rules.Interested in helping? SeeCONTRIBUTING.mdfor a few guidelines.Getting StartedIt's strongly recommended to use a tool likepipxto install this package in an isolated environment:$pipxinstallgmail-yaml-filtersGenerating XMLBy default, the command line script will generate XML to stdout, which
you can then upload to Gmail yourself:$gmail-yaml-filtersmy-filters.yaml>my-filters.xmlSynchronization via Gmail APIIf you are the trusting type, you can authorize the script to
upload new filters and remove obsolete filters via Gmail's API.
Before using any of these commands, you will need to createclient_secret.jsonand store it in the same directory as your YAML file.# Upload all filters (and create new labels) from the configuration file$gmail-yaml-filters--uploadmy-filters.yaml# Delete any filters that aren't defined in the configuration file$gmail-yaml-filters--prunemy-filters.yaml# Do both of these steps at once.$gmail-yaml-filters--syncmy-filters.yaml# See what would happen but don't apply any changes.$gmail-yaml-filters--dry-run--syncmy-filters.yaml# Delete all your filters. (Yikes!)$gmail-yaml-filters--delete-allIf you need to pipe configuration from somewhere else, you can do that
by passing a single dash as the filename.# (but why would you need to do this?)$catfilters.yaml|gmail-yaml-filters--sync-Sample Configuration# Simple example-from:googlealerts-noreply@google.comlabel:newsnot_important:true# Boolean conditions-from:any:-alice-bob-carolto:all:[me,-MyBoss]label:conspiracy# Nested conditions-from:lever.colabel:hiringmore:-has:'completedfeedback'archive:true-has:'whatisyourfeedback'star:trueimportant:true# Foreach loops-for_each:-list1-list2-list3rule:to:"{item}@mycompany.com"label:"{item}"# Foreach loops with complex structures-for_each:-[mailing-list-1a,list1]-[mailing-list-1b,list1]-[mailing-list-1c,list1]-[mailing-list-2a,list2]-[mailing-list-2b,list2]rule:to:"{item[0]}@mycompany.com"label:"{item[1]}"-for_each:-{list:list1,domain:example.com}-{list:list2,domain:whatever.com}rule:to:"{list}@{domain}"label:"{list}"ConfigurationSupported conditions:has(alsomatch)does_not_have(alsomissing,no_match)subjectlistlabeledfrom,to,cc, andbcccategorydeliveredtofilenamelargersmallersizerfc822msgidisandhaswork likeGmail's search operators, for example:has: attachmentis translated tomatch: "has:attachment"is: -snoozedis translated tono_match: "is:snoozed"Supported actions:archiveforwardimportant(alsomark_as_important)label, including support for Gmail'scategory tabs:CATEGORY_PERSONALCATEGORY_SOCIALCATEGORY_PROMOTIONSCATEGORY_UPDATESCATEGORY_FORUMSnot_important(alsonever_mark_as_important)not_spamread(alsomark_as_read)startrash(alsodelete)Any set of rules withignore: truewill be ignored and not written to XML.Similar Projectsgmail-brittais written in Ruby and lets you express rules with a DSL.gmail-filtersis written in Python and has a web frontend.google-mail-filteris written in Haskell and lets you express rules with a DSL.
Package: gmaltcli
IntroductionThis project provides a few CLI commands to download, extract and import HGT data into a SQL database.It has been tested on python 2.7, 3.4, 3.5 and 3.6 and works with PostgreSQL with and without PostGIS extension.DocumentationInstallationThe CLI commands :gmalt-hgtget:download and extract HGT zip filesgmalt-hgtread:read an elevation value in a HGT filegmalt-hgtload:load the HGT data in a SQL databaseRoadmapFeel free to make a pull request for any of the items in this list :Provide a bash script in case the executableraster2pgsqlis presentImprove interface with parser usingnamedtupleSupport MySQL without GIS extensionSupport MySQL with GIS extensiongmalt-hgtloadshould support importing a single file instead of the content of a folder
Package: gmalthgtparser
IntroductionThis package provides a class to parse and iterate over HGT file.
It should support SRTM1 and SRTM3 formats but I must confess having only worked with SRTM3 for now.InstallationpipinstallgmalthgtparserThis is compatible python 2.7, 3.4, 3.5 and 3.6.UsageImport the parser :>>>fromgmalthgtparserimportHgtParserGet the elevation of a coordinate inside a file>>>withHgtParser('/tmp/N00E010.hgt')asparser:...alt=parser.get_elevation((1.0001,10.0001))# (alt, lng)...# return a tuple (line index from the top, column index from the left, elevation in meters)...print(alt)...(0,0,57)Iterate over all the elevation values inside a file.>>>withHgtParser('/tmp/N00E010.hgt')asparser:...forelev_valueinparser.get_value_iterator():...# each value is a tuple (zero based line number, zero based column number, zero based index, square corners of the elevation value, elevation value)...print(elev_value)...break...(0,0,0,((0.9995833333333334,9.999583333333334),(1.0004166666666667,9.999583333333334),(1.0004166666666667,10.000416666666666),(0.9995833333333334,10.000416666666666)),57)Iterate over square of elevation values inside a file.>>>withHgtParser('/tmp/N00E010.hgt')asparser:...forelev_valueinparser.get_sample_iterator(50,50):# (width, height)...# each value is a tuple (zero based line number of top left corner, zero based column number of top left corner, zero based index of top left corner, square corners position, list of all elevation values in square line per line)...print(elev_value[:-1])...# print number of lines in elevation values list and number of column in each line and the first elevation value...print(len(elev_value[4]),len(elev_value[4][0]),elev_value[4][0][0])...break...(0,0,0,(0.95875,9.999583333333334),(1.0004166666666667,9.999583333333334),(1.0004166666666667,10.04125),(0.95875,10.04125))(50,50,57)ReleaseJust for me to remember# Increase version number and tag repositoryrm-rfgmalthgtparser.egg-info/pythonsetup.pyregister-rpypitestpythonsetup.pysdistbdist_eggbdist_wheelupload-rpypitest# check installation in a custom venvmkdirtmpcdtmpvirtualenvvenv.venv/bin/activatepipinstall-ihttps://testpypi.python.org/pypigmalthgtparserpythonfromgmalthgtparserimportHgtParser# Then push to productionpythonsetup.pyregister-rpypipythonsetup.pysdistbdist_eggbdist_wheelupload-rpypi
Package: gmanka-yml
gmanka ymlsome useful shortcuts for pyyamlinstallationpipinstallgmanka_ymlnavigationto_strto_filefrom_strfrom_filedefaultexpected_typechangelogto_str^converts any data to yml string and returns itimportgmanka_ymlasymlmy_dict={'element_1':1,2:'element_2',3:['list_element_1','list_element_2',]}print(yml.to_str(my_dict))output:element_1:12:element_23:-list_element_1-list_element_2to_file^same asto_str, but writes data to file instead of returningyml.to_file(data=my_dict,path='file.yml',)from_str^importgmanka_ymlasymlmy_str='''element_1: 12: element_23:- list_element_1- list_element_2'''my_dict=yml.from_str(my_str)print(my_dict)print(type(my_dict))output:{'element_1':1,2:'element_2',3:['list_element_1','list_element_2']}<class'dict'>from_file^same asfrom_str, but reads data from fileyml.from_file('file.yml')defaultyml.from_str(1)# raises TypeErroryml.from_str(1,default=None)# returns Noneexpected typeyml.from_str(data='{}',expected_type=list,)# raises TypeErroryml.from_str(data='{}',default=None,expected_type=list,)# returns None
Package: gmapFinder
GmapFinderInstallationpip install gmapFinderHow to use it?Here are the functions which will provide some results...import gmapFinderTo get current locationgmapFinder.getCurrentLocation()This will provide you a dictionary, in which you will get details like,IP, City, Region, Country, Location, Org, Postal, TimezoneTo get direction detailsgmapFinder.getDirection("Lucknow, Uttar Pradesh", "Tokyo, Japan")It requires 2 arguments,StartingPoint (you don't have to put complete address, it will automatically calculate if not given complete) and DestinationPoint.It will then return a dictionary having theurl of Google Map link,total distance in (km, miles),starting point and destination point address and location.If you write "current" in address then, it will find the directions from your current location.Thank You !!!
Package: gmapi
# gmPython GrayMeta API bindings.This project is used to access your GrayMeta installation API using python.## InstallationThis is avaialble on pypypip install gmapi## Usage`gmapi` can be used directly via the terminal with the `gm` command, or via the API.## Usage (Terminal)You must first make the `GRAYMETA_SERVER_URL` and your `GRAYMETA_API_KEY` available as environment variables, then you can call `gm````export GRAYMETA_SERVER_URL=https://your-installation-of-graymetaexport GRAYMETA_API_KEY=your-api-keye```> See your Admin for details of these valuesNext, you can just call `gm`:```gm```## Usage (API)Having installed gmapi via `pip`, you can then use it directly in your python, for example(demo.py)```from gmapi import gmapi.GraymetaClientSERVER_URL="https://your-server"API_KEY="your-gm-api-key"client = GraymetaClient(SERVER_URL, API_KEY)client.search()```## API DocumentationTODO
Package: gmap-scrabbler
\n# Google Map Reviews Web Scrabbler 🗺️The Google Map Reviews Web Scrabbler is a specialized tool designed to extract Google Maps reviews to a .CSV file. 📜Please note that this tool is configured to perform a specific task and may not be suitable for customizing to your
specific requirements. ⚙️Installation & Usage Instructions 🚀To use this tool, you'll need to set up the necessary components. Here are the installation steps:Web/Chrome Driver 🌐: This tool utilizes Selenium, which requires a web driver to interact with your chosen web
browser. Web drivers serve as intermediaries between Selenium and the browser, facilitating communication through a
common wire protocol. To get started, follow these steps:Download the Chrome Driver fromhere.Once downloaded, copy or cut the driver file from your downloads folder.Paste the driver file into your C drive, typically located atC:\chromedriver_win32\chromedriver.exe. Please
ensure you follow this path to avoid any path-related errors. 🚗Pip installation 🐍: Ensure you have installed the package by running the following command:python-mpipinstallgmap_scrabblerUsage: Run the following command in the CLI window and provide necessary arguments:python -m gmap_scrabblerArguments⚙️: You will be prompted to enter the following information:url: The URL of the Google Maps reviews page you want to scrape.export_path: The path where the extracted reviews will be saved as a CSV file. The specified folder should already
exist. You can customize the export path, but if none is provided, the default path is set to "D:/".lang: The browser locale for viewing the Google Maps page. By default, it is set to "en" (English), but you can
specify other supported locales like "es" (Spanish). You will be prompted to enter this value.review_limit: The maximum number of reviews you want to extract. You can specify the limit, but if none is
provided, the default limit is set to 1000. You will be prompted to enter this value.Output 📦:The script will initiate a web browser, load the Google Maps reviews page, scroll through the reviews, and extract the
specified number of reviews.
Once the extraction is complete, the reviews will be saved to a CSV file in the specified export path. 📂Please keep in mind that this tool is intended for a specific purpose, and customization beyond its predefined
functionality may require additional development efforts. 🔧👨‍💻Technologies and Libraries Used 🛠️Python 3.7+TyperSeleniumPandasPublished to PyPi using GitHub actions and Twine 📦🔗
Package: gmaps-locationshare-api
Google Maps location share APIA fully asynchronous API client for Google Map's location share functionality.InstallYou must install the following libraries:aiohttp(asynchronous HTTP)playwright(asynchronous webdriver)undetected-playwright-patch(Bypass Google's bot detection)pickle(session persistence)It is recommended to install the following libraries:asyncio(Running asynchronous code)Runpip install gmaps-locationshare-apito install.How it worksPlaywright obtains a session via a manual log-in attempt by the user.
The client also has the ability to persist a session between different instances by
locally caching session cookies, and session refresh capabilities.The client then uses said session to call Google's internal location share API to obtain relevant data.DocumentationSample usages are inmain.pyclass Client(persist: bool = False, persist_directory: str = None, timeout: int = 30000)persist: Whether or not the session is locally cached to be used by subsequent invocation ofClientin the same or a different program instance.persist_directory: Cache location. Note that the cache location must be consistent for all clients that wishes to use the cached session.timeout: Max allowed time to login before browser timeouts (in milliseconds)Client.refresh_session(): Refresh session cookies to prevent stale sessions.Client.get_data() -> [Person]: Get current location share data. Each call represent one reading at the current time, it doesn't not contain historical readings.Relevant type definitions are ingmaps_locationshare_api/types.py
Package: gmaps-locator
gmaps_locatorUnder construction! Beta Version! Currently experimenting and planning!Developed by Akbar Tolandy (c) 2023Examples of How To Use (Beta Version)fromgmaps_locatorimportGetCoordcoord=GetCoord()address='Jl. Jenderal Sudirman No.Kav. 60, RT.5/RW.3, Senayan, Kec. Kby. Baru, Kota Jakarta Selatan, Daerah Khusus Ibukota Jakarta 12190'print(coord.get_latlon(address))# example output{'lat':'-6.2257608','lon':'106.804772'}
Package: gmaps-tracker
gmaps_trackerLogging of locations of shared connections from Google Maps.The project is under construction.PrerequisitsCookies for authentication. See next chapter how to get them.How to get get cookies.txt for Google mapsFirefox:Install addon:export-cookies-txtLog in with your user to opengoogle.com/mapsClick on addon logo / "Export cookies for google.com"Save the file as cookies.txt in the root of this projectChrome:Extension:get-cookiestxtextension for ChromeLog in with your user to opengoogle.com/mapsClick on the icon of the extension & export the cookies as file
Package: gmaps-url-parser
Parse google maps URLsInstall (automatic)$ pip install gmaps-url-parserInstall (manual)$ git clone
$ cd gmaps-url-parser
$ python setup.py installUsage>>>fromgmaps_url_parserimportparse>>>url="https://www.google.com/maps/place/u+Saada,+Algeria/@35.2131065,4.1479717,10106m/data=!3m1!1e3!4m2!3m1!1s0x128bb3c644644ec3:0x7f746dd09dad9a9f">>>parse(url){'latitude':35.2131065,'zoom_level':'10106','place':'Bou Saada, Algeria','maptype':'earth','longitude':4.1479717}LicenseMIT
Package: gmArrayFilter
split merged chip file$ gmArray filter array-splitarray.file split.dir –prefix prefixfilter chip data$ gmArray filter array-filer-web–array-dir uploads/project/605b06231ac54fdcc821c83f –array-dir public/publicData/array –genome-dir /home/kent/data/gmap/gmapdb/data –out-dir public/score/605b06431ac54fdcc821c845 –array-annotation-dir public/array –options ‘{“mutant”:[“mutant”],”wild”:[“wild”],”mutant_parent”:[],”wild_parent”:[],”array”:”660K”,”child_max_na”:0,”parent_max_na”:1,”mutant_gt”:”homozygous”,”wild_gt”:”heterozygous”,”mutant_parent_gt”:”homozygous”,”wild_parent_gt”:”homozygous”,”strict”:0,”density_window”:1000000,”density_step”:500000,”genomes”:[“CSv1.0”,”CSv2.0”]}’
Package: gmatautomation
# GMAT Automation
The GMAT Automation package is a related set of Python scripts used to generate and run batches of GMAT model files. Various scripts are also provided to reduce the ReportFiles and Contact Locator files that GMAT execution produces.Three modules are provided:
-modelcontrol: includes the gmat_batcher to execute batches of model scripts in a multithreaded mode.-modelgen: extract GMAT model specifications from a spreadsheet and build model batch files-reportgen: Format and post process GMAT output reports into Excel file form,See docs/GMATAutomation_SoftwareUserManual.docx for further detail.The following external dependencies must be installed to Python/Lib/site-packages.-numpy-scipy-subprocess-pywintypes-xlwings-xlsxwriter-PyQt5
Package: gmc
GMCgmc geiger counter apiabout the devicegmc geiger counterAn inexpensive geiger counter that has many software interface projects.This tool can be found on amazon.aim of this projectThis projectgmcupdates to python3 and
attempts to simplify some of the features of the gmc api.  Many of the
bug fixes and were utilized from other projects as listed ininstallationUsing pip I suggest creating a virtualenv first.python3 -m venv venv
source ./venv/bin/activateThen install gmc using pip from webpip install gmcOr from local directorypip install ~/projects/rad/gmcusagepython
>>> from gmc import GMC
>>> g = GMC()  # or with configuration GMC({'DEFAULT_BAUDRATE':57600})
>>> g.version()
'GMC-300Re 4.22'featuresaccess to gmc device api functionsread and modify configurationread historyheartbeat as non blocking processmodular configuration per device modelutilize ctypes.Structure for confiuration modeltests using pytestpreparation setup for pypi deploymentGMC class has a logger = logging='gmc.gmc'inject configuration into GMC to override gmc.configtodoparse history logsissues with writing configuration - mostly worksexample scripts to report to internet radiation detection sites.other projectsThere are others out there too.  Here is what I worked from.geigerloggq-gmc-controlgqgmc-codestelas/gclogradiation mapping sitesradmon.orgbash binary filesgmc produces a tmp file of history data.
it is in binary formattake a look at the raw history data file.example:od -t x1 /tmp/tmpdmtc4ow1.bin

hexdump -x /tmp/tmpdmtc4ow1.bin

hd /tmp/tmpdmtc4ow1.bin | HEAD

xxd /tmp/tmpdmtc4ow1.bin | headtestingtesting could be harmful to your device.
you may have to factory reset it with
some types of commands.this will activate all testspytestjust run one test by namepytest --pdb -k test_deviceusb connectiondifferent per system.createudev-usbto describe linux connections.
Package: gm-canada-ai
Project TitleOne Paragraph of project description goes hereGetting StartedThese instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.PrerequisitesWhat things you need to install the software and how to install themGive examplesInstallingA step by step series of examples that tell you how to get a development env runningSay what the step will beGive the exampleAnd repeatuntil finishedEnd with an example of getting some data out of the system or using it for a little demoRunning the testsExplain how to run the automated tests for this systemBreak down into end to end testsExplain what these tests test and whyGive an exampleAnd coding style testsExplain what these tests test and whyGive an exampleDeploymentAdd additional notes about how to deploy this on a live systemBuilt WithDropwizard- The web framework usedMaven- Dependency ManagementROME- Used to generate RSS FeedsContributingPlease readCONTRIBUTING.mdfor details on our code of conduct, and the process for submitting pull requests to us.VersioningWe useSemVerfor versioning. For the versions available, see thetags on this repository.AuthorsBillie Thompson-Initial work-PurpleBoothSee also the list ofcontributorswho participated in this project.LicenseThis project is licensed under the MIT License - see theLICENSE.mdfile for detailsAcknowledgmentsHat tip to anyone whose code was usedInspirationetc
Package: gmcm-django-superadmin
SuperadminSuperadmin is a Django app based in django admin to build admin sites quickly and easily, and generate site page like django admin.Detailed documentation is in the "docs" directory.Quick startAdd "superadmin" to your INSTALLED_APPS setting like this::INSTALLED_APPS = [
...
'superadmin',
]Runpython manage.py migrateto create the superadmin migrations.Continue