Saravanan666/pypi-org huggingface dataset:
Package: pygbn
pygbnThis package implements the generalized binary noise (GBN) model of[1]in Python.
The code is based on the Matlab implementation revised by Ivo Houtzager in 2007 at the Delft Center of Systems and Control.InstallationYou can very easily install the package using pip:pipinstallpygbnor after locally cloning the source code:pipinstall.UsageBelow is an example of how to use the package.importmatplotlib.pyplotaspltfrompygbnimportgbnif__name__=='__main__':seed=0# random seedh=0.05# sampling period [s]T=1# length of signal [s]A=1# amplitude of signalts=1# estimated settling time of the process [s]# flag indicating process damping properties# flag = 0 if the process is over-damped (default)# flag = 1 if the process is oscillary (min phase)# flag = 2 if the process is oscillary (non min phase)flag=0# generate time arrayt=np.arange(start=0,stop=T,step=h)# generate the signal# the gbn function returns a time array and a signal arrayu=gbn(h,T,A,ts,flag,seed=seed)# optional: plot the generated signalplt.plot(t,u)Citations[1]Tulleken, H. J. (1990).
Generalized binary noise test-signal concept for improved identification-experiment design.
Automatica, 26(1), 37-49.
Package: pygbop
Geely GBOP Clientrequest demo:frompygbopimportGbopApiClient,Method,BasicAuthauth=BasicAuth(access_key='xxxxxxxxxxxxxxxxx',secret_key='xxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx')client=GbopApiClient(auth,base_url='hello.api-dev.test.xxxxx.com')print('=============GET=============')params={'params1':'123','params3':['s','w','k'],'params2':'321',}res=client.execute(Method.GET,'/api/v1/hello',params)print(res.decode('utf-8'))print('=============POST=============')data={'params3':'testA','params4':'testB'}res=client.execute(Method.POST,'/api/v1/demo',data=data)print(res.decode('utf-8'))print('=============POST2=============')params={'params3':'testA','params4':'testB'}header={'content-type':'application/json;charset=utf-8'}res=client.execute(Method.POST,'/api/v1/demo',params=params,data=data,header=header)print(res.decode('utf-8'))cloud event push demo:frompygbopimportCloudEventBasicAuth,EventPushClientauth=CloudEventBasicAuth(producer_group='xxxxxxx',subject='persistent://Information_Technology/xxxx/XXXX_EVENT',secret_token='xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx')event_push_client=EventPushClient(auth=auth,base_url='http://xxxx.dev.xxxxx.com')data={"message":"hello 喵啪斯"}response=event_push_client.push_message(data=data,source='xx.cmdb',type_='xx:cmdb:InstanceChanged')print(response.decode('utf-8'))orfrompygbopimportCloudEventBasicAuth,EventPushClientauth=CloudEventBasicAuth(producer_group='xxxxxxx',subject='persistent://Information_Technology/xxxx/XXXX_EVENT',secret_token='xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx')event_push_client=EventPushClient(auth=auth,base_url='http://xxxx.dev.xxxxx.com')data={"message":"hello 喵啪斯"}response=event_push_client.push(data=data,source='xx.cmdb',type_='xx:cmdb:InstanceChanged')ifresponse.result:message_id=response.dataelse:code=response.codefail_message=response.message
Package: pygbq
PyGBQEasily integrate data in BigQueryExamplefrompygbqimportClientimportrequestsclient=Client()token=client.get_secret('secret_name')headers={'Authorization':f'Bearer{token}'}url=...data=requests.get(url,headers=headers).json()response=client.update(data=data,table_id='mydataset.mytable',how=['id'])This snippets gets some data from anurland (merges)[https://cloud.google.com/bigquery/docs/reference/standard-sql/dml-syntax#merge_statement] ((upserts)[https://en.wikipedia.org/wiki/Merge_(SQL)]) onidcolumn it to the tablemytablein the datasetmydataset.Install and set uppip install pygbqSet up theauthentication.How it workshow=['column1', 'column2', ...]PyGBQ generates one or many temporary tables that are merged into the target table. During the mergeallthe columns of the target table are updated.
Here's how it looks like:Splitdatainto batches.For every batch createmydataset.mytable_tmp_SOMERANDOMPOSTFIX, put it inside and runMERGEmyproject.mydataset.mytableTUSINGmyproject.mydataset.mytable_tmp_SOMERANDOMPOSTFIXSONT.column1=S.column1ANDT.column2=S.column2WHENNOTMATCHEDTHENINSERTROWWHENMATCHEDTHENUPDATESETcolumn1=S.column1,column2=S.column2,column3=S.column3,column4=S.column4...how='replace'Creates a tablemydataset.mytablewith schema automatically generated bybigquery-schema-generator.Splits data into batches and inserts it tomydataset.mytable.how='fail'Identical tohow='replace'except that it fails ifmydataset.mytableexists.how='insert'Splits data into batches and inserts (appends) it tomydataset.mytable.For more details look atDocumentationsection.DocumentationHere's the documentation with default parameters.ClientinitfrompygbqimportClientclient=Client(default_dataset=None,path_to_key=None)Initalizes a client. You can specify:default_dataset- (str) default dataset that theclientwill be using to reference tablespath_to_key- (str) By default PyGQB usesfrom google.auth import defaultto get credentials, but you can specify this parameter if you wish to usefrom google.auth import load_credentials_from_fileinstead.updateclient.update(data,table_id,how,schema:Union[str,List[dict]]=None,expiration=1,max_insert_num_rows=4000)Updates table.data- list of dicttable_id- (str) Table id, could have one of the following forms:table_nameifdefault_datasetis setdataset_name.table_nameproject_id.dataset_name.table_namehow- (str or List[dict]) Look atHow it workssectionexpiration- (float) temporary tables expiration time in hoursmax_insert_num_rows- (int) how many rows per temporary table is insertedqueryclient.query(query)Execute a query in BigQuery.query- (str) BigQuery queryget_secretclient.get_secret(self,secret_id,version="latest")Get a secret stored in Secret Manager.secret_id- (str) Secret nameversion- Secret versionadd_secretclient.get_secret(self,secret_id,version="latest")Adds a new secret version in Secret Manager.secret_id- (str) Secret namedata- (str) Secret valueread_jsonlfrompygbqimportread_jsonlread_jsonl(name:str="data.jsonl")Reads a new line delimited json.
Package: pygbuttons
PygButtonsA module made to help create a UI in pygame by simplifying the creation and handling of basic UI objects (such as Buttons).ContentsInstallationDependenciesUsageSupportInstallationTo install, run:pip install pygbuttonsDependenciesPython => 3.8Pygame => 2.0.1UsageTo use the Buttons in a program, it is recommended to perform the following steps:SetupImport the module / the contents of the module.Set the settings for the Buttons module (framerate, scroll factor, scaling limits) where appropriateCreate the required ButtonsWhile runningPass all (relevant) Pygame.Events to the active Buttons in the input loopUpdate the Buttons with information which is not event driven (e.g. cursor position)Draw the Buttons to the active screenRepeatGetting an output from a Button can be done either by binding a function to the Button (which is then automatically executed when a certain action takes place), or by polling the Buttons value / status.For a practical implementation, see theexample.pyfile.SupportFor support / issues, please visit the issue tracker onGitHub.Source code available at:https://github.com/Jarno-de-Wit/PygButtons
Package: pygcc
pygccA tool for thermodynamic calculations and geochemical database generationpyGeochemCalc (pygcc) is a python-based program for thermodynamic calculations and producing the
Geochemist's Workbench (GWB), EQ3/6, TOUGHREACT, and PFLOTRAN thermodynamic database from
ambient to deep Earth temperature and pressure conditionspygcc is developed for use in the geochemical community by providing a consolidated
set of existing and newly implemented functions for calculating the thermodynamic properties
of gas, aqueous, and mineral (including solid solutions and variable-formula clays) species,
as well as reactions amongst these species, over a broad range of temperature and pressure
conditions, but is also well suited to being modularly introduced into other modeling tools
as desired. The documentation is continually evolving, and more examples and tutorials will gradually be added (feel free to
request features or examples; seeContributingbelow).Installation$pipinstallpygccExamplesCheck out the documentation for galleries of examplesGeneral Usage,Integration with GWBandIntegration with EQ3/6.
If you would prefer to flip through notebooks on Bitbucket, these same examples can be found in the folderdocs/.ContributingInterested in contributing? Check out the contributing guidelines. Please note that this project is released with a Code of Conduct.
By contributing to this project, you agree to abide by its terms. For more information, see thedocumentation,
particularly theContributing pageandCode of Conduct.Licensepygccwas created by Adedapo Awolayo and Benjamin Tutolo. It is licensed under the terms of the GNU General Public License v3.0 license.CitationIf you use pygcc for your research, citation of the software would be appreciated. It helps to quantify the impact of
pygcc, and build the pygcc community. For information on citing pygcc,see the relevant docs pageCreditspygcc Logowas designed byYury Klyukin,pygccwas created withcookiecutterand thepy-pkgs-cookiecuttertemplate.
Package: pygcgen
Automaticaly generate a changelog based on GitHub issues and pull requests.
For each tag there will be a section with closed issues and merged
pull requests. Also there can be user defined sections based on labels.This package started as a conversion from ruby to python of theGitHub Changelog GeneratorChange Logv0.2.4(2018-06-08)Full
ChangelogClosed issues:Tag label headings are H1 instead of H2#27Socket gaierror with default simultaneous requests#23Merged pull requests:Scheduled monthly dependency update for June#26(pyup-bot)v0.2.3(2018-04-03)Full
ChangelogImplemented enhancements:Add an option to set the maximum allowed simultaneous threads …#24(topic2k)Merged pull requests:Initial Update#21(pyup-bot)Config file for pyup.io#20(pyup-bot)v0.2.2(2017-04-21)Full
ChangelogFixed bugs:Skip non-merged closed issues?#18(alexanderad)Closed issues:Links in unreleased section don’t work#16Merged pull requests:changes for using pygcgen with python 2.7#19(topic2k)v0.2.1(2016-10-07)Full
ChangelogImplemented enhancements:add quiet option#14(topic2k)Closed issues:Issues missing if no section given#12Merged pull requests:Show issues in changelog when no section(s) were given.#13(topic2k)v0.2.0(2016-10-07)Full
ChangelogUsage changes:Add user definable sections#7Implemented enhancements:new option: tag-separator#11(topic2k)v0.1.2(2016-10-02)Full
ChangelogClosed issues:Show example file!#2Publish to PyPI#1Merged pull requests:Python 2+3 compatibility#6(topic2k)v0.1.1(2016-09-11)Full
ChangelogMerged pull requests:Add option to keep output file if it exists#5(topic2k)Prepare for releasing on PyPi.#4(topic2k)0.1.0(2016-09-11)Implemented enhancements:Add option to use GitHub tags instead of markdown links#3(topic2k)
Package: pygcj
A GCJ02 and WGS-84 coordinate converter.Increase the accuracy by control pointsGenerate Control PointsDefault gcp file’s grid interval is 1 degree. If you want generate new
gcp file,please run:pythongenerate_gcp.pyTransform between WGS84 and GCJ02frompygcj.pygcjimportGCJProjtrans=GCJProj()# wgs84 to gcjgcj_lat,gcj_lon=trans.wgs_to_gcj(45.2,112.8)# gcj to wgs84wgs_lat,wgs_lon=trans.gcj_to_wgs(45.2,112.8)# gcj to wgs84 and specific threshold(default is 0.000001)wgs_lat,wgs_lon=trans.gcj_to_wgs(45.2,112.8,0.00000001)accuracy test (use default control points)origional:
distance mean: 347.554477357
distance stdev: 164.494315519

eviltransform:
distance mean: 3.39331251552
distance stdev: 2.6602095071

pygcj.gcj_to_wgs():
distance mean: 0.395794995772
distance stdev: 0.571923075943
Package: pygclip
pygmentizeto clipboard for macOSThis utility package is designed to send code throughpygmentizeand save it as rich HTML in your macOS
clipboard. It can then be pasted easily into anything that accepts styled HTML input, such as Evernote, OneNote, Gmail,
etc.Usagepygclipoffers a couple ways to retrieve code for passing on topygmentize:From a fileVia the standard inputPulling it from your clipboardExamples below:File$catpath/to/file.pydeffoo():return'bar'$pygclip-smonokai-lpythonpath/to/file.pyStandard input$pygclip-smonokai-lpythondeffoo():bar()Clipboard$echo"def foo():\n    return 'bar'"|pbcopy$pygclip-smonokai-lpython-c
Package: pyGCMC
pyGCMCpyGCMC is a python package for performing grand canonical Monte Carlo simulations of molecules in nanoporous materials. It is designed to be easy to use and to be easily extensible. It is also designed to be easy to install, with minimal dependencies. The package is written in pure python, and the only dependencies are numpy.RequirementsThe python package is written in python, C++ and CUDA. The python package requires numpy. The C++ code requires a C++11 compatible compiler. The CUDA code requires a CUDA compatible GPU and the CUDA toolkit.InstallationThe package can be downloaded from GitHubhttps://github.com/mackerell-lab/pyGCMCDownload the source code from GitHub and run the setup script:pip install .Or you can install the package from PyPI:pip install pygcmcThe web page for the package on PyPI ishttps://pypi.org/project/pygcmc/UsageRun the pyGCMC executable:usage: pygcmc [-h] -p file.pdb [-t file.top] [-s file.psf] [-o file.txt] [-u muex1,muex2,...] [-f conf1,conf2,... or conf] [-n mcsteps] [-m mctime1,mctime2,...]
            [-c conc1,conc2,...] [-y cavity_bias_dx] [-e seed] [-P] [-w]

pyGCMC - A python package for GCMC simulation

options:
  -h, --help            show this help message and exit
  -p file.pdb, --pdb-file file.pdb
                        The file .pdb for GCMC
  -t file.top, --top-file file.top
                        The file .top for GCMC
  -s file.psf, --psf-file file.psf
                        The file .psf for GCMC
  -o file.txt, --out-file file.txt
                        The output file for GCMC
  -u muex1,muex2,..., --fragmuex muex1,muex2,...
                        The value of solute muex(splice by , with no space), if the first value is negative, then follow the -u or --fragmuex without space
  -f conf1,conf2,... or conf, --fragconf conf1,conf2,... or conf
                        The value of solute conf(splice by , with no space). Or only one value for all solutes
  -n mcsteps, --mcsteps mcsteps
                        The number of MC steps
  -m mctime1,mctime2,..., --mctime mctime1,mctime2,...
                        The mctime of solutes(splice by , with no space)
  -c conc1,conc2,..., --fragconc conc1,conc2,...
                        The value of solute concentration(splice by , with no space)
  -y cavity_bias_dx, --cavitybias-dx cavity_bias_dx
                        The value of cavity bias dx(if dx <= 0, then no cavity bias)
  -e seed, --seed seed  The seed of random number
  -P, --PME             Enable PME(Default: Disable)
  -w, --show-info       Show the information of solutesTo Rungcmcas the old version, you can use the following command:usage: gcmc [-h] -p PARAMFILE [-v] [--logfile LOGFILE] [--debug] [--version]

Perform GCMC Simulation

options:
  -h, --help            show this help message and exit
  -p PARAMFILE, --paramfile PARAMFILE
                        [Required] input parameter file
  -v, --verbose         [Optional] verbose output
  --logfile LOGFILE     [Optional] log file, if not specified, then output will be stdout
  --debug               [Optional] for debug purpose
  --version             Show program's version number and exit
Package: pygcn
PyGCNAnonymous VOEvent client for receiving GCN/TAN notices in XML formatTheGamma-ray Coordinates Network/Transient Astronomy Network (GCN/TAN)is
a system for distributing astronomical alerts, largely focused on operations of
and detections from high-energy satellite missions.GCN/TAN disseminates both Notices (prompt, machine-readable alerts) and
Circulars (human-readable correspondence) through a handful of delivery methods
and formats.This package implements a simple client that listens forVOEventXML
format notices over the custom TCP/IPVOEvent Transport Protocol. By
default, it connects to one of the anonymous GCN/TAN server, so no sign-up
or configuration is necessary to begin receiving alerts.InstallationTo install PyGCN, simply run:$ pip install --user pygcnUsagePyGCN provides an example script calledpygcn-listenthat will simply write
all VOEvents that it receives to files in the current directory. To try it out,
simply run:$ pygcn-listenand then type Control-C to quit.Writing a custom GCN handlerYou can also write your own handler that performs a custom action for every GCN
that is received. A handler function takes two arguments:payload, the raw
content of the GCN, androot, the root element of the XML document as parsed
bylxml.etree. Here is a basic example:#!/usr/bin/env pythonimportgcn# Define your custom handler here.defhandler(payload,root):# Get the IVORN, or unique VOEvent ID, and print it.print(root.attrib['ivorn'])# Print all of the event attributes.forparaminroot.findall('./What/Param'):name=param.attrib['name']value=param.attrib['value']print('{}={}'.format(name,value))# Listen for VOEvents until killed with Control-C.gcn.listen(handler=handler)FilteringYou can also filter events by notice type usinggcn.include_notice_typesorgcn.exclude_notice_types.
Here is an example:#!/usr/bin/env pythonimportgcn# Define your custom handler here.@gcn.include_notice_types(gcn.notice_types.FERMI_GBM_FLT_POS,# Fermi GBM localization (flight)gcn.notice_types.FERMI_GBM_GND_POS,# Fermi GBM localization (ground)gcn.notice_types.FERMI_GBM_FIN_POS)# Fermi GBM localization (final)defhandler(payload,root):# Look up right ascension, declination, and error radius fields.pos2d=root.find('.//{*}Position2D')ra=float(pos2d.find('.//{*}C1').text)dec=float(pos2d.find('.//{*}C2').text)radius=float(pos2d.find('.//{*}Error2Radius').text)# Print.print('ra ={:g}, dec={:g}, radius={:g}'.format(ra,dec,radius))# Listen for VOEvents until killed with Control-C.gcn.listen(handler=handler)
Package: py-gcode-metadata
This program is used for obtaining metadata from G-code
files e.g. file name, material type, estimated print time, etc.First, program will try to obtain any useful metadata from the file name.
Then the G-code file is quick parsed by looking at comment blocks in the
beginning and at the end of a file.
If this parsing keeps failing, file is parsed using line by line method.Any metadata obtained from the path will be overwritten by metadata from
the file if the metadata is contained there as well.Desired metadata are specified by Attributes in FDMMetaData class.
Package: pygcurse
Pygcursehttp://inventwithpython.com/pygcursehttps://github.com/asweigart/pygcursePygcurse (pronounced "pig curse") is a curses library emulator that runs on top of the Pygame framework. It provides an easy way to create text adventures, rougelikes, and console-style applications.Unfortunately, the curses library that comes with the Python standard library does not work on Windows. The excellent Console module from effbot provides curses-like features, but it only runs on Windows and not Mac/Linux. By using Pygame, Pygcurse is able to run on all platforms.Pygcurse provides several benefits over normal text-based stdio programs:1) Color text and background.
2) The ability to move the cursor and print text anywhere in the console window.
3) The ability to make console apps that make use of the mouse.
4) The ability to have programs respond to individual key presses, instead of waiting for the user to type an entire string and press enter (as with input()/raw_input()).
5) Since the console window that Pygcurse uses is just a Pygame surface object, additional drawing and transformations can be applied to it. Multiple consoles can also be used in the same program.Pygcurse requires Pygame to be installed. Pygame can be downloaded fromhttp://pygame.orgPygcurse was developed by Al Sweigart (al@inventwithpython.com)https://github.com/asweigart/pygcurseThe github repo contains several example programs.
Package: pygcvs
A Python library for reading variable star data from theGeneral Catalog of Variable Stars.InstallationUsepipto install latest release available at PyPI:pip install pygcvsUsageDownload theiii.datfile fromGCVSand point theread_gcvsfunction at its location.
The function returns a generator which yields a single star data dictionary
at a time. See below:>>> import pygcvs
>>> for star in pygcvs.read_gcvs('iii.dat'):
...     print(star['name'])
R AND
S AND
#...
V0515 VUL
V0516 VULResourcesDocumentationIssue trackerCI serverAuthorZbigniew Siciarz(zbigniew at siciarz dot net)Licensepygcvs is free software, licensed under the MIT/X11 License. A copy of
the license is provided with the source code in the LICENSE file.
Package: pygdal
Virtualenv friendly GDAL bindings for PythonThis package is for you if you had problems installing GDAL in your virtualenv.
You can install GDAL into your virtualenv using this package but you still need
to install GDAL library and its header files on your system. On Ubuntu it can be
done this way:$sudoapt-getinstalllibgdal1-devVersion of the same package, and GDAL, so that if you have installed GDAL 3.6.4
you need to install 3.6.4.* of this package:$gdal-config--version3.6.4
$virtualenv--no-site-packagesenv
$env/bin/pipinstallpygdal=="3.6.4.*"The trick with range of versions required to support pygdal versioning.Packagenumpyis also listed as a dependency, so you do not need to install it
before installing GDAL. After package is installed you can use is same way as
standard GDAL bindings:fromosgeoimportgdal,ogr,osr# ...
Package: pygdal2tiles
gdal2tilesA python library for generating map tiles inspired bygdal2tiles.pyfromGDALproject.DependanciesGDALdevelopment header files, sometimes available aslibgdal-devorlibgdal-develpackages.InstallationTo install gdal2tiles library you can use pip:$pipinstallgdal2tilesBasic usageimportgdal2tilesgdal2tiles.generate_tiles('/path/to/input_file','/path/to/output_dir/')You can also pass various keyword as optional keyword arguments togenerate_tiles()function.
For examplegdal2tiles.generate_tiles('input_file','output_dir/',nb_processes=2,zoom='7-9')ORoptions={'zoom':(7,9),'resume':True}gdal2tiles.generate_tiles('input_file','output_dir/',**options)In generalgdal2tiles.generate_tiles(input_file,output_folder,**options)Arguments:input_file(str): Path to input file.output_folder(str): Path to output folder.options: Tile generation options.options:profile(str): Tile cutting profile (mercator,geodetic,raster) - default‘mercator’ (Google Maps compatible)resampling(str): Resampling method (average,near,bilinear,cubic,cubicspline,lanczos,antialias) - default ‘average’s_srs: The spatial reference system used for the source input datazoom: Zoom levels to render; format:[int min, int max],‘min-max’orint/str zoomlevel.resume(bool): Resume mode. Generate only missing files.srcnodata: NODATA transparency value to assign to the input datatmscompatible(bool): When using the geodetic profile, specifies the baseresolution as 0.703125 or 2 tiles at zoom level 0.verbose(bool): Print status messages to stdoutkml(bool): Generate KML for Google Earth - default for ‘geodetic’profile and ‘raster’ in EPSG:4326. For a dataset with
different projection use with caution!url(str): URL address where the generated tiles are going to be publishedwebviewer(str): Web viewer to generate (all,google,openlayers,none) -default ‘all’title(str): Title of the mapcopyright(str): Copyright for the mapgooglekey(str): Google Maps API key fromhttp://code.google.com/apis/maps/signup.htmlbingkey(str): Bing Maps API key fromhttps://www.bingmapsportal.com/nb_processes: Number of processes to use for tiling.History0.1.0 (2018-05-06)First release on PyPI.0.1.1 (2018-05-10)Clean the source code.Setup documentationSetup testing environment0.1.2 (2018-05-16)Bug fix ingenerate_tiles().0.1.3 (2018-07-31)Use billard for multiprocessing if available.0.1.4 (2018-08-14)Accept list or tuple in specifying tile generation zoom level.0.1.5 (2018-08-14)Bug fix.