Saravanan666/pypi-org huggingface dataset:
Package: gstbasetransform
gstbasetransformis a module that aims to provide a patchedGstBase.BaseTransformclass usable from python.Source code repository and issue tracker:https://github.com/Muges/gstbasetransform/License:LGPL 2.1 – see the fileLICENSEfor details.Installationgstbasetransformshould work with python 2.7 and python 3.4+.You will first need to installPyGObjectandpython-gst, as they are not
available on pip. You can then install the latest version ofgstbasetransformwith pip:pip install gstbasetransformUsagegstbasetransform provides a subclass ofGstBase.BaseTransform, also calledBaseTransform, whosedo_transform_sizevirtual method has been patched
to be usable in python.In the originaldo_transform_sizevirtual method, theothersizeparameter
that represents the size of the output buffer is anint, and is passed by
copy, preventing it from being changed. Ingstbasetransform.BaseTransform,
it has been removed, and the size of the output buffer can be set with a return
value of the method.The signature of the method is:do_transform_size(direction, caps, size, othercaps)and it should return a tuple(bool, int), where theintis the size of
the output buffer.See thetest_gstbasetransform.pyfile for a basic example.CreditsThanks to Dustin Spicuzza for writingpygi-treeview-dnd, which served as a
base for writinggstbasetransform.
Package: gst-calculation
GST CalculationGST is a module that calculates Greedy String Tiling algorithm as described in "String Similarity via Greedy String Tiling and Running Karp−Rabin Matching" (Wise, 1993) -https://www.researchgate.net/publication/262763983_String_Similarity_via_Greedy_String_Tiling_and_Running_Karp-Rabin_MatchingInstallationUsing PIP via PyPIpip install gst-calculationUsing PIP via Githubpip install git+https://github.com/tomytw/gst-calculation.git@0.1.2UsageImporting the package>>> from gst_calculation import gstYou can calculate a gst of a collection of numbers or strings (or any collection of object that can be compared using equal function, must have __eq__ method inside it's class)The result will be array that contains two elements (two index):Tile information (position and length of matched tiles)Total scoreGST on Numbers List>>> tokens_sequence_1 = [1,2,3,4,5]
>>> tokens_sequence_2 = [3,4,5,6,7]
>>> gst.calculate(tokens_sequence_1, tokens_sequence_2, minimal_match=3)
    [[{'token_1_position': 2, 'token_2_position': 0, 'length': 3, 'score': 3}], 3]GST on Strings List>>> tokens_sequence_1 = ['the', 'quick', 'brown', 'fox', 'jumps', 'over', 'the', 'lazy', 'dog']
>>> tokens_sequence_2 = ['the', 'lazy', 'dog', 'jumps', 'over', 'the', 'quick', 'brown', 'fox']
>>> gst.calculate(tokens_sequence_1, tokens_sequence_2, minimal_match=3)
    [[{'token_1_position': 0, 'token_2_position': 5, 'length': 4, 'score': 4},
    {'token_1_position': 6, 'token_2_position': 0, 'length': 3, 'score': 3}],
    7]
Package: gstchecker
gstcheckerThe details of a company is fetched using therequestslibrary and parsed withBeautifulSoup4. GSTIN number — a 15 digit tax identification number is used to generate the name, address, type, etc. of the company.Run this command in the terminal to installgstcheckerpackagepip install gstcheckerDocumentationTo import the file use the below codeimport gstcheckerThe program uses default test url and input parameters for testing and educational purposes. To GET details from GSTIN usegstchecker.check("_15 character GSTIN goes here_")You check whether the check() was a success or not usinggstchecker.status()variable nameentity valuegstchecker.nameEntity namegstchecker.panEntity PANgstchecker.personEntity registreegstchecker.typeEntity typegstchecker.addEntity addressgstchecker.dateEntity registration dateTo print a particular variable listed above use the functiongstchecker.disp(_variable to print_)To quickly print all the variables togethergstchecker.printall()To print all the variable seperated by \t ot \n then use the following function. The \t or \n must be included within single or double quotes.gstchecker.printwith("\n")To use this program you need to have legal access from a website to GET details. The website should have two inputs in the form, one input for gstin number and another a hidded input for csrf token. The default must be changed before using. The author is not responsible for how the program is being used.To change all the value of the request parameter, use the functiongstcheckerset("http://example.com/search.php","inputName","csrfmidwaretoken")To change the just theurlof the programgstchecker.seturl("htttp://example.com/search.php")To change just theinputName(It is the name="value" of the input tag)gstchecker.setinput("value")To change only thecsrf(It is the name="value" of the hidden input tag)gstchecker.setcsrf("value")Note that these parameters must be change before callingcheck()for it apply.parametervariable nameURL valuegstchecker.urlinput tag name valuegstchecker.inputNamecsrf hidden input tag name valuegstchecker.csrfNameErrorsErrors are listed in specific order so that that one error can lead to subsequent errors in the list.displayed errorexplanation[Offline]check()was not called and no parameters were sent and no data received[GET URL Failure]means the url is incorrect/incompatible ot No Internet[Content retreival failure]means url, input and csrf parameter are not compatible and no data was received[Parsing Failure]means that some data was received, but it was unable to translate to needed data. The site may have altered its HTML[No Error]is shown when requesting status throughgstchecker.status()if all function worked perfectlyScreenshotsFunctionality issuesThe program faces issues with correctly parsingnature(removed for improved functionality) and date.
Package: gst-e-invoicing
Python library for GST's E-invoicing portalThis is the python library for interacting with GST's E-invoicing portal.DocumentationGetting StartedLibrary MethodsObtaining CredentialsUsing passthrough APIsHandling ErrorsUsageInstall the library:pipinstallgst-e-invoicingUse it in your code:fromgst_irnimportSession,get_invoice,get_seller_dtlsfromgst_irn.codesimportStateswithopen('public_key.pem')asf:public_key=f.read()session=Session('GSTIN',client_id='CLIENT_ID',client_secret='CLIENT_SECRET',username='USERNAME',password='PASSWORD',public_key=public_key,# use the sandbox url, or production url# or pass-through APIs provided by GSPsbase_url='https://einv-apisandbox.nic.in',)session.generate_token()# create invoice object# can also use the helper functions for the sameinvoice={"Version":"1.1","TranDtls":{"TaxSch":"GST","SupTyp":"B2B"},"DocDtls":{"Typ":"inv","No":"221","Dt":"21/09/2021",},"SellerDtls":{"Gstin":"09GSTNUMBER1Z5","LglNm":"PARTY NAME","Addr1":"Seller Address","Loc":"City","Pin":111111,"Stcd":States.UTTAR_PRADESH.value,},"BuyerDtls":{"Gstin":"37GSTNUMBER2ZP","LglNm":"BUYER NAME","Pos":States.KOLKATA.value,"Addr1":"Buyer Address","Loc":"City","Pin":555555,"Stcd":States.KOLKATA.value,},"ItemList":[{"SlNo":"1","IsServc":"Y","HsnCd":"998431","UnitPrice":100,"IgstAmt":12,"TotAmt":100,"AssAmt":100,"GstRt":12.0,"TotItemVal":112,}],"ValDtls":{"TotInvVal":112,"AssVal":100,"IgstVal":12},"EwbDtls":{"Distance":10},}# submit and get the e-invoiceeinvoice=session.generate_einvoice(invoice)# access irn and qr-codeprint(einvoice['Irn'])# prints irn# print qr-codefromgst_irn.qrimportget_qr_code_image_htmlqr_code_image=get_qr_code_image_html(einvoice['SignedQRCode'])qr_code_image# prints <img src="...">Find the full documentation here:https://mittal-analytics.github.io/gst-e-invoicing/DevelopmentSetting up dev environment:# create and activate virtual envpython3-mvenv.venvsource.venv/bin/activate# install requirementspipinstall'.[dev]'# provide credentialscp.env.sample.env# edit and update the credentials in .env filevi.env# running testspython-munittest
Package: gstin
PAN from GSTINDescriptionThis is a Python library to retrieve PAN (India) from input GSTINAuthorRashmi RaoVersion History*0.3 Updated setup.py
*0.2 Added executing program steps0.1 Initial ReleaseInstallingpip install gstin==0.3Executing programfrom gstin import fn_gstinfn_gstin()fn_gstin(your GSTIN in quotes)code blocks for commandsLicenseMIT - see the LICENSE.md file for details
Package: gstop
gstopGeneration Stopping Criteria for transformers Language ModelInstallationpipinstallgstopUsagefromgstopimportGenerationStopper,STOP_TOKENS_REGISTRYfromtransformersimportAutoModelForCausalLM,AutoTokenizermodel_name="mistralai/Mistral-7B-v0.1"model=AutoModelForCausalLM.from_pretrained(model_name)tokenizer=AutoTokenizer.from_pretrained(model_name)stopper=GenerationStopper(STOP_TOKENS_REGISTRY["mistral"])input_ids=tokenizer("Hello, world!",return_tensors="pt").input_idsout=model.generate(input_ids,stopping_criteria=stopper.criteria)print(stopper.format(tokenizer.decode(out[0])))
Package: gstreamer-rgw-sink
Gstreamer ceph rgw sink plugin.
Streams video from a src to ceph object storage.Pip installpip install gstreamer-rgw-sinkPART 1: Installgit clone https://github.com/Streaming-multiple-video-sources-Edge/gstreamer-rgw-sink.gitIf you are NOT running ubuntu:podman run -ti --privileged --net=host -v `pwd`:/work docker.io/jweng1/gst-base-image:v1
    cd work
    cd gstreamer-rgw-sink

    python3 -m venv venv
    source venv/bin/activate
    pip install -U wheel pip setuptools
    pip install -r requirements.txt
    
    pip install gstreamer-rgw-sinkIf you are running ubuntu:cd gstreamer-rgw-sink

    python3 -m venv venv
    source venv/bin/activate
    pip install -U wheel pip setuptools
    pip install -r requirements.txt
    
    pip install gstreamer-rgw-sinkPART 2: Exporting pluginexport GST_PLUGIN_PATH=$GST_PLUGIN_PATH:$PWD/venv/lib/gstreamer-1.0/:$PWD/venv/lib/python3.6/site-packages/gstreamer-rgw-sinkPART 3: Inspect plugingst-inspect-1.0 python
      
      You should see something like this,
    
      Plugin Details:
      Name                     python
      Description              loader for plugins written in python
      Filename                 /work/gstreamer-rgw-sink/venv/lib/gstreamer-1.0/libgstpython.cpython-36m-x86_64-linux-gnu.so
      Version                  1.14.5
      License                  LGPL
      Source module            gst-python
      Binary package           GStreamer GObject Introspection overrides for Python 
      Origin URL               http://gstreamer.freedesktop.org

      cephrgwsink: cephrgwsinkSink

      1 features:
      +-- 1 elementsExample pipelinegst-launch-1.0 -v souphttpsrc location=https://youtubelink.com ! cephrgwsink cephrgwsink endpointurl=replaceME accesskey=replaceME secretkey=replaceME bucket=replaceME partsize=replaceME key=replaceME limitsize=replaceME
Package: gstreasy
gstreasyA re-imagining ofgstreamer-python.Some of the new features:Auto setup/teardown of main loop threadAuto detect caps if in gst-launch commandAuto detect and configureappsinkandappsrcif in commandSupport forappsinkandappsrcin same pipelineSupport for multiple sinks in the same pipelineFasterGst.Sample->np.ndarrayby caching capsExample UsageInstall with:python -m pip install gstreasyAlso check out theuser_code.pyscript for anappsrcexample.
As I write more examples they will appear in theexamples/folder.Simple pipeline without anappsinkelement:simple_cmd="videotestsrc num-buffers=60 ! autovideosink"withGstPipeline(simple_cmd)aspipeline:print("Running simple pipeline")Pipeline with an appsink element:appsink_cmd="videotestsrc num-buffers=60 ! appsink emit-signals=true sync=false"withGstPipeline(appsink_cmd)aspipeline:whilepipeline:buffer=pipeline.pop()ifbuffer:type(buffer.data)# np.ndarrayPipeline usingteeelement and multiple sinks:tee_cmd='''videotestsrc num-buffers=60 ! tee name=tt. ! queue ! video/x-raw,format=RGB,framerate=60/1! appsink emit-signals=true sync=falset. ! queue ! video/x-raw,format=RGB,framerate=60/1! jpegenc ! avimux! filesink location=recording.mp4'''withGstPipeline(tee_cmd)aspipeline:whilepipeline:buffer=pipeline.pop()# do whatever you want with the buffer's ndarray# Meanwhile recording.mp4 is being writtenDevelopAll dev tasks can be handled with therun.shscript but it just wraps standard tools if you can't/don't want use it.python -m pip install -e .[dev,doc]to install depstoxto run tests for py3.7, py3.10, and py3.11.flake8andmypyfor lintingpdoc -d google src/gstreasyfor online docsTo help debugging, you can breakpoint inside functions that run on a separate thread,
if you insert the following lines just before your breakpoint. Tested on PyCharm but should work with most IDEs.
Please remove them before opening your pull request.importpydevdpydevd.settrace(suspend=False,trace_only_current_thread=True)
Package: gstui
Work in progressGSTUIA Text User Interface for exploring Google Cloud Storage. Fast and cached.Intallationpipinstall-UgstuiInstallfzfUsageRungstuiorgstui --helpto see more options.Loading buckets or the inital listing for the first time can take a long time to cache. You can create an initial cache of everything with:gstui -a.The first picker is for selecting the bucket and the second is for selecting the blob to download.DevelopmentBe free to submit a PR. Check the formatting with flake8 and for new features try to write tests.TestspoetryruntestsOr manuallypoetryrunpytesttests-n4-vvvTODOBetter thread managementDon't rely ontime.sleepfor cache testsurwidUIRelated ProjectsgsutilA command line tool for interacting with cloud storage services.gcsfuseA user-space file system for interacting with Google Cloud Storage
Package: gsuite
gsuite-python-libraryPython library to interact with Google Suite APIGoogle Services which are currently supported are:Google GroupsGoogle SheetsRequirementsPython 3.X.XVirtualenv(Recommended)InstallationYou can usepipandvirtualenv. Create a new virtual environment, then activate the environment and use this command to install:$pipinstallgsuiteOr you can do it withoutvirtualenv.sudomost likely be required:$sudopipinstallgsuiteAuthorRafi Kurnia PutraLicenseApache 2 Licensed. SeeLICENSEfor full details.
Package: gsuite-exporter
GSuite ExporterThis package handles exporting data from the GSuite Admin APIs to a destination.The following GSuite Admin APIs are currently supported:reports_v1-Reports APIadmin-Admin activity reportsdrive-Google Drive activity reportslogin-Login activity reportsmobile-Mobile activity reportstoken-Authorization Token activity reportsThe following destinations are currently supported:Stackdriver LoggingRequirementsA GSuite Admin accountA service account with:GSuite domain-wide delegationenabled.The IAM roleroles/iam.tokenCreatorgranted to the service account on the project it was created in.On the service account's project:Enable theIdentity and Access Management (IAM) API.On the destination project:Enable theAdmin Reports API.CollectorsTo collect data from the Admin SDK APIs, you need to grant extra permissions to your service account:Go to yourAdmin Consoleand login with your GSuite administrator accountNavigate toSecurity > Advanced Settings > Manage API client accessGrant the following scopes (comma-separated) to your service account'sclient_id:https://www.googleapis.com/auth/admin.reports.audit.readonlyhttps://www.googleapis.com/auth/iamExportersStackdriver LoggingTo use the Stackdriver Logging exporter, you need to grant extra IAM roles to your service account:roles/logging.vieweron the destination projectroles/logging.logWriteron the destination projectInstallationpipinstallgsuite-exporterUsageTheGSuite Exportercan be used either using the command-line interface or as a Python library.Using the CLIAn example sync from the Admin Reports API to Stackdriver Logging for the 'login' application looks like:gsuite-exporter--credentials-path='/path/to/service/account/credentials.json'--admin-user='<your_gsuite_admin>@<your_domain>'--api='report_v1'--applications='login drive token'--project-id='<logging_project>'--exporter='stackdriver_exporter.StackdriverExporter'Thecredentials_pathvariable is optional and you can useApplication Default Credentialsinstead.Using as a libraryAn example sync from the Admin Reports API to Stackdriver Logging looks like:fromgsuite_exporter.cliimportsync_allsync_all(credentials_path=/path/to/service/account/credentials.json,admin_user='<user>@<domain>',api='reports_v1',applications=['login','drive','token'],project_id='<project-id>',exporter_class='stackdriver_exporter.StackdriverExporter')More examples are available using the library functions under theexamples/directory.
Package: gsuitefy
gsuiteGsuite Admin client to manage users and groupsHow to useInstall:pipinstallgsuitefyImport:fromgsuitefy.gsuiteimportGSuiteAdminSample:# User with gsuite manager rightsMANAGER_USER_MAIL='group-manager@bar.com'# Email of the Service AccountSERVICE_ACCOUNT_EMAIL='sa@bar.iam.gserviceaccount.com'# Path to the service account JSON fileSERVICE_ACCOUNT_FILE_PATH=os.path.join(os.path.dirname(__file__),'service-account.json')gsuite=GSuiteAdmin(group_management_email=MANAGER_USER_MAIL,service_account=SERVICE_ACCOUNT_FILE_PATH,service_account_email=SERVICE_ACCOUNT_EMAIL)gsuite.add_member_to_group(member='foo@bar.com',groupKey='foo-group@bar.com')DevelopmentInstall all the project's dependenciespipinstall-rrequirements.txtContributors
Package: gs-update-utils
English:Google Sheets Utils ModuleThe module provides convenient utilities for working with Google Sheets. Features include establishing a connection to the Google Sheets API, reading data from a sheet, and uploading a DataFrame to Google Sheets with retry support.InstallationbashCopy codepip install gs-update-utilsUsageEstablishing a ConnectionpythonCopy codefromgs-update-utilsimportsetup_google_sheetscredentials_folder ="path/to/credentials"credentials_file ="credentials.json"google_credentials = setup_google_sheets(credentials_folder, credentials_file)Reading Data from a SheetpythonCopy codefromgs-update-utilsimportread_gs_tableworksheet_id ="your_worksheet_id"worksheet_name ="your_worksheet_name"dataframe = read_gs_table(worksheet_id, worksheet_name, google_credentials)Uploading DataFrame to Google SheetspythonCopy codefromgs-update-utilsimportupload_table_to_google_sheetworksheet_id ="your_worksheet_id"worksheet_name ="your_worksheet_name"upload_table_to_google_sheet(dataframe, worksheet_id, worksheet_name, google_credentials)Русский:Модуль Google Sheets UtilsМодуль предоставляет удобные утилиты для работы с Google Sheets. Возможности включают установку соединения с API Google Sheets, чтение данных из листа и загрузку DataFrame в Google Sheets с поддержкой повторных попыток.УстановкаbashCopy codepip install gs-update-utilsИспользованиеУстановка соединенияpythonCopy codefromgs-update-utilsimportsetup_google_sheetscredentials_folder ="path/to/credentials"credentials_file ="credentials.json"google_credentials = setup_google_sheets(credentials_folder, credentials_file)Чтение данных из листаpythonCopy codefromgs-update-utilsimportread_gs_tableworksheet_id ="your_worksheet_id"worksheet_name ="your_worksheet_name"dataframe = read_gs_table(worksheet_id, worksheet_name, google_credentials)Загрузка DataFrame в Google SheetspythonCopy codefromgs-update-utilsimportupload_table_to_google_sheetworksheet_id ="your_worksheet_id"worksheet_name ="your_worksheet_name"upload_table_to_google_sheet(dataframe, worksheet_id, worksheet_name, google_credentials)
Package: gs-usb
gs_usbPython Windows/Linux/Mac CAN driver based on usbfs or WinUSB WCID for Geschwister Schneider USB/CAN devices, candleLight USB CAN interfaces, CAN Debugger devices and other interfaces utilising the gs_usb driver.Getting StartedInstall bypip install gs_usbBelow is a basic demo for CAN message sending and receiving.importtimefromgs_usb.gs_usbimportGsUsbfromgs_usb.gs_usb_frameimportGsUsbFramefromgs_usb.constantsimport(CAN_EFF_FLAG,CAN_ERR_FLAG,CAN_RTR_FLAG,)defmain():# Find our devicedevs=GsUsb.scan()iflen(devs)==0:print("Can not find gs_usb device")returndev=devs[0]# Configurationifnotdev.set_bitrate(250000):print("Can not set bitrate for gs_usb")return# Start devicedev.start()# Prepare framesdata=b"\x12\x34\x56\x78\x9A\xBC\xDE\xF0"sff_frame=GsUsbFrame(can_id=0x7FF,data=data)sff_none_data_frame=GsUsbFrame(can_id=0x7FF)err_frame=GsUsbFrame(can_id=0x7FF|CAN_ERR_FLAG,data=data)eff_frame=GsUsbFrame(can_id=0x12345678|CAN_EFF_FLAG,data=data)eff_none_data_frame=GsUsbFrame(can_id=0x12345678|CAN_EFF_FLAG)rtr_frame=GsUsbFrame(can_id=0x7FF|CAN_RTR_FLAG)rtr_with_eid_frame=GsUsbFrame(can_id=0x12345678|CAN_RTR_FLAG|CAN_EFF_FLAG)rtr_with_data_frame=GsUsbFrame(can_id=0x7FF|CAN_RTR_FLAG,data=data)frames=[sff_frame,sff_none_data_frame,err_frame,eff_frame,eff_none_data_frame,rtr_frame,rtr_with_eid_frame,rtr_with_data_frame,]# Read all the time and send message in each secondend_time,n=time.time()+1,-1whileTrue:iframe=GsUsbFrame()ifdev.read(iframe,1):print("RX{}".format(iframe))iftime.time()-end_time>=0:end_time=time.time()+1n+=1n%=len(frames)ifdev.send(frames[n]):print("TX{}".format(frames[n]))if__name__=="__main__":try:main()exceptKeyboardInterrupt:pass
Package: gsw
GSW-PythonThis Python implementation of the Thermodynamic Equation of Seawater 2010 (TEOS-10) is based primarily on numpy ufunc wrappers of the GSW-C implementation.
This library replaces the originalpython-gswpure-python implementation..
The primary reasons for this change are that by building on the C implementation we reduce code duplication and we gain an immediate update to the 75-term equation.Additional benefits include a major increase in speed,
a reduction in memory usage,
and the inclusion of more functions.
The penalty is that a C (or MSVC C++ for Windows) compiler is required to build the package from source.Warning: this is for Python >=3.8 only.Documentation is provided athttps://teos-10.github.io/GSW-Python/.For the core functionality, we use an auto-generated C extension
module to wrap the C functions as numpyufuncs,
and then use an autogenerated Python module to add docstrings and handle masked arrays.
165 scalar C functions with only double-precision arguments and return values are wrapped as ufuncs,
and 158 of these are exposed in thegswnamespace with an additional wrapper in Python.A hand-written wrapper is used for one C function, and others are re-implemented directly in Python instead of being wrapped.
Additional functions present in GSW-Matlab but not in GSW-C may be re-implemented in Python,
but there is no expectation that all such functions will be provided.InstallationPip users can install the pre-built wheels with:pipinstallgswconda users will find binaries on conda-forge,condainstallgsw--channelconda-forgeThe development version of the package can be installed from a clone of the repo usingpipinstall.It is neither necessary nor recommended to run the code generators,
and no instructions are provided for them;
their output is included in the repo.
You will need a suitable compiler:
gcc or clang for unix-like systems,
or the MSVC compiler set used for Python itself on Windows.
For Windows, some of the source code has been modified to C++ because the MSVC C compiler does not support the
C99 complex data type used in original GSW-C.To test, after installation, run "pytest" from the source directory.Note for xarray usersA wrapper around gsw calledgsw-xarrayexists for xarray.
It adds CF compliant attributes when possible, units, and name.Note on generating the docstringsThe autogenerated docstrings are checked with codespell in the CIs.
when autogenerating them we need to runpre-commit run --all-filesand fix the documentation issues found.