Saravanan666/pypi-org huggingface dataset:
Package: g2pw
g2pW: Mandarin Grapheme-to-Phoneme ConverterAuthors:Yi-Chang Chen, Yu-Chuan Chang, Yen-Cheng Chang and Yi-Ren YehThis is the official repository of our paperg2pW: A Conditional Weighted Softmax BERT for Polyphone Disambiguation in Mandarin(INTERSPEECH 2022).Newsg2pW is included inPaddlePaddle/PaddleSpeechg2pW is included inmozillazg/pypinyin-g2pWGetting StartedDependency / Install(This work was tested with PyTorch 1.7.0, CUDA 10.1, python 3.6 and Ubuntu 16.04.)InstallPyTorch$ pip install g2pwQuick Demo>>>fromg2pwimportG2PWConverter>>>conv=G2PWConverter()>>>sentence='上校請技術人員校正FN儀器'>>>conv(sentence)[['ㄕㄤ4','ㄒㄧㄠ4','ㄑㄧㄥ3','ㄐㄧ4','ㄕㄨ4','ㄖㄣ2','ㄩㄢ2','ㄐㄧㄠ4','ㄓㄥ4',None,None,'ㄧ2','ㄑㄧ4']]>>>sentences=['銀行','行動']>>>conv(sentences)[['ㄧㄣ2','ㄏㄤ2'],['ㄒㄧㄥ2','ㄉㄨㄥ4']]Load Offline Modelconv=G2PWConverter(model_dir='./G2PWModel-v2-onnx/',model_source='./path-to/bert-base-chinese/')Support Simplified Chinese and Pinyin>>>fromg2pwimportG2PWConverter>>>conv=G2PWConverter(style='pinyin',enable_non_tradional_chinese=True)>>>conv('然而，他红了20年以后，他竟退出了大家的视线。')[['ran2','er2',None,'ta1','hong2','le5',None,None,'nian2','yi3','hou4',None,'ta1','jing4','tui4','chu1','le5','da4','jia1','de5','shi4','xian4',None]]Scripts$ git clone https://github.com/GitYCC/g2pW.gitTrain ModelFor example, we train models on CPP dataset as follows:$ bash cpp_dataset/download.sh
$ python scripts/train_g2p_bert.py --config configs/config_cpp.pyPrediction$ python scripts/test_g2p_bert.py \
    --config saved_models/CPP_BERT_M_DescWS-Sec-cLin-B_POSw01/config.py \
    --checkpoint saved_models/CPP_BERT_M_DescWS-Sec-cLin-B_POSw01/best_accuracy.pth \
    --sent_path cpp_dataset/test.sent \
    --output_path output_pred.txtTesting$ python scripts/predict_g2p_bert.py \
    --config saved_models/CPP_BERT_M_DescWS-Sec-cLin-B_POSw01/config.py \
    --checkpoint saved_models/CPP_BERT_M_DescWS-Sec-cLin-B_POSw01/best_accuracy.pth \
    --sent_path cpp_dataset/test.sent \
    --lb_path cpp_dataset/test.lbCheckpointsG2PWModel-v2.zipG2PWModel-v2-onnx.zipCitationTo cite the code/data/paper, please use this BibTex@article{chen2022g2pw,author={Yi-Chang Chen and Yu-Chuan Chang and Yen-Cheng Chang and Yi-Ren Yeh},title={g2pW: A Conditional Weighted Softmax BERT for Polyphone Disambiguation in Mandarin},journal={Proc. Interspeech 2022},url={https://arxiv.org/abs/2203.10430},year={2022}}
Package: g2py
g2py🎨 g2py 是@AntV/G2在 Python3 上的封装。与 G2Plot采用同样的方式进行封装相关文档：English README·绘制常用统计图表·在 Jupyter 中使用·技术原理安装$pipinstallg2py使用渲染成 HTMLfromg2pyimportPlotchart10=Plot("Chart")chart10.set_options({"type":"density","autoFit":"true","data":{"type":"fetch","value":"https://assets.antv.antgroup.com/g2/species.json","transform":[{"type":"kde","field":"y","groupBy":["x"],"size":20}],},"encode":{"x":"x","y":"y","color":"x","size":"size"},"tooltip":'true',})# 1. 渲染成 html 文件chart10.render("plot.html")# 2. 渲染成 html 字符串chart10.render_html()在 Jupyter 中使用fromg2pyimportPlotchart10=Plot("Chart")chart10.set_options({"type":"density","autoFit":"true","data":{"type":"fetch","value":"https://assets.antv.antgroup.com/g2/species.json","transform":[{"type":"kde","field":"y","groupBy":["x"],"size":20}],},"encode":{"x":"x","y":"y","color":"x","size":"size"},"tooltip":'true',})chart10.render_notebook()chart10.render_jupyter_lab()使用 `JS` 方法，你可以创建一个 JavaScript 的代码片段去处理各种回调方法属性。


## API

目前 `g2py` 只提供简单的一个 API。

 - **Plot**

1. *Plot(plot_type: str)*: 获取 `Plot` 对应的类实例。

2. *plot.set_options(options: object)*: 给图表实例设置一个 [G2](https://g2.antv.antgroup.com/) 图形的配置，文档可以直接参考 G2 官网，未进行任何二次数据结构包装。

3. *plot.render(path, env, **kwargs)*: 渲染出一个 HTML 文件，同时可以传入文件的路径，以及 jinja2 env 和 kwargs 参数。

4. *plot.render_notebook(env, **kwargs)*: 将图形渲染到 jupyter 的预览。

5. *plot.render_jupyter_lab(env, **kwargs)*: 将图形渲染到 jupyter lab 的预览。

6. *plot.render_html(env, **kwargs)*: 渲染出 HTML 字符串，同时可以传入 jinja2 env 和 kwargs 参数。

7. *plot.dump_js_options(env, **kwargs)*: 输出 Javascript 的 option 配置结构，同时可以传入 jinja2 env 和 kwargs 参数，可以用于 Server 中的 HTTP 结构返回数据结构。
Package: g2p_zh_en
g2p_zh_enIntroductiong2p_zh_en is an open-source project that provides a mixed Grapheme-to-Phoneme (G2P) conversion between Chinese and English based on Bigcidian’s translation table. It aims to convert text between Chinese and English phonemes, allowing for pronunciation and speech-related applications.FeaturesG2P conversion from Chinese to EnglishG2P conversion from English to ChineseHandling of special characters, such as numbers and currenciesInstallation.Make sure your environment meets the following requirements:Python 3.xOther dependencies (listed in requirements.txt).Install the required dependencies by running the following command:pip install -r requirements.txt. Install g2p_zh_en using pip:pip install g2p_zh_enUsageImport the G2P class from g2p_zh_en and create an instance:fromg2p_zh_en.g2p_zh_enimportG2Pg2p=G2P()text="我有100美元,i'm so rich."output=g2p.g2p(text)print(output)['w','uɔ3','y','əu3','y','ii4','b','ai3','m','ei3','yu','an2',',',' ','ai','m',' ','s','əu',' ','r','i','ch',' ','.']text="i have 100 dollar,我是不是很富有？"output=g2p.g2p(text,language='en-us')print(output)['ai',' ','h','æ','v',' ','w','ʌ','n',' ','h','ʌ','n','d','r','ə','d',' ','d','a','l','ər',' ',',',' ','w','uɔ3','sh','iii4','b','uu2','sh','iii4','h','ən3','f','uu4','y','əu3',' ','？']Please note that the output represents the phonetic representation of the input text.In ProgressThe following features are currently being developed:[x] G2P conversion with Chinese as the primary language.[x] G2P conversion with English as the primary language.[ ] Handling various special characters, such as numbers and currencies.
ContributionIf you would like to contribute to this project, you can:Submit bug reports or feature requests on the project’s issue page.
Fork the project, create your own branch, and submit a pull request.
Improve documentation and code comments.
Thank you for your support and contributions!LicenseThis project is licensed under the GNU General Public License.History0.1.0 (2023-07-14)First release on PyPI.
Package: g2tools
This module contains a small number of tools useful for analyzing
contributions to the muon’s magnetic moment from (lattice) QCD vacuum
polarization. The functions or classes include:moments(G)Compute moments ofjjcorrelatorG.mom2taylor(mom)Convert momentsmominto Taylor coefficients forq2-expansion.taylor2mom(tayl)Convert Taylor expansion coefficientstaylinto moments.vacpol(mom)Create a Pade approximant for the subtracted
vacuum polarization (PI-hat) from thejjcorrelator
whose moments (or Taylor coefficients) are inmom.fourier_vacpol(G)Create subtracted vacuum polarization (PI-hat) by
Fourier transformingjjcorrelatorG(t).a_mu(pihat, Q)Compute the contribution to the muon’sg-2anomaly from function pihat (usually built by vacpol).R2G(E, R)Compute the Euclidean G(t) corresponding to data
for Re+e-.R2a_mu(E, R)Compute the leading-order contribution to the
muon’sg-2anomaly corresponding to data
for Re+e-.TanhWin(t0, t1, dt)Create a filter for applying a t-window inmonents(...)orfourier_vacpol(...).pade_gvar(f, m, n)General-purpose code for determining Pade approximants
to a power series whose coefficients areGVars (ie,
Gaussian random variables, for error propagation).pade_svd(f, m, n)General-purpose code for determining Pade approximants
for a power series whose coefficients are floats.
Usessvdregularization to stabilize results when
the input data are noisy.Information on how to install the module is in the file INSTALLATION.To test the module trymake tests.Documentation is in the doc directory: open doc/html/index.html
or look online at <https://g2tools.readthedocs.io>.The examples directory has a complete example, showing how to go from Monte
Carlo data for ajjcorrelator to a contribution to the muon’s magnetic
moment anomalyaµ. See also the introduction in the documentation.The general technique that underlies this module is described in
Chakrabortyet al, Phys.Rev. D89 (2014) no.11, 114501. GooglearXiv:1403.1778to find a preprint on the web.Created by G. Peter Lepage (Cornell University) on on 2014-09-13.Copyright (c) 20014-22 G. Peter Lepage.
Package: g3
G3All-in-one CLI to commit your work to Github [Presentation,Design]Installpipinstallg3AliasYou can, optionally, create thealias g=g3so that you execute simplyg commitandg pr.Configurationg3configureYou will be asked to enter:your Github tokenyour open-ai keythe openai model you want to usethe temperature which will be used to generate the commit messages and PR descriptionsthe openai api versionthe tone which will be used in the commit messages and PR descriptionsthe commit message max charactersthe PR description max wordsUsageCommitg3commitOptions:--tone: The tone to use--jira: The jira ticket(s) to reference--include: A phrase you want to include--edit: The hash of the commit you want to rephrasePRg3prOptions:--tone: The tone to use--jira: The jira ticket(s) to reference--include: A phrase you want to include--edit: The number of the PR you want to rephraseDevelopmentThe project requiresPython 3.11andPoetryfor dependency management.Optionally configure poetry to create the virtual environment within the project as follows:poetryconfigvirtualenvs.in-projecttrueBuildNow install the project, along with its development dependencies, in a local virtual environment as follows:poetryinstallYou may enable the virtual environment, so that you run modules without thepoetry runprefix, as follows:source `poetry env info -p`/bin/activateor simply as follows:poetry shellContributionYou are expected to enable pre-commit hooks so that you get your code auto-sanitized before being committed.mypy:   Static type checker of variables and functions based onPEP 484isort:  Optimizes importsblack:  Opinionated code formatter based onPEP 8flake8: Improves code style and quality based onPEP 8Install pre-commit before starting to contribute to the project as follows:pre-commit install
Package: g36-ahu-faults
g36-ahu-faultsThis project is under development to eventually be a Pypi package for Fault Detection Diagnostics (FDD) on HVAC system datasets with the Pandas computing library.See also (in development) for other HVAC system types:g36-boiler-plant-faultsg36-chiller-plant-faultsNote - Fault equations expect a float between 0.0 and 1.0 for a control system analog output that is typically expressed in industry HVAC controls as a percentage between 0 and 100% of command.Examples of a analog output could a heating valve, air damper, or fan VFD speed. For sensor input data these can be either float or integer based. Boolean on or off data for control system
binary commands the fault equation expects an integer of 0 for Off and 1 for On.Reference AHU fault equations here defined by ASHRAE Guideline 36:https://github.com/bbartling/open-fdd/tree/master/air_handling_unit/imagesLicenseg36-ahu-faults is made available under the MIT license. Enjoy!DevelopmentYou can follow the development of g36-ahu-faults onGitHubvia theopen-fddproject for ASHRAE G36 Fault Detection Diagnostics.ContributingTo contribute to g36-ahu-faults please open an issue on theGitHub issue trackerand/or leave a Pull Request. Thanks!FDD Dataset ContributingAny good anonymous HVAC FDD datasets in CSV format where lots of faults are found please contribute in a community effort:https://github.com/bbartling/Data
Package: g3hardware
System G3 Hardware XML configuration GeneratorTheSystem G3 Hardware XML configuration Generatorlibrary provides a specialized classes to mimic the creation, configuration, and connection of the B&R X20 PLC modules.Key FeaturesObject representation of the hardware modulesAbility to connect hardware modules into "Isles":Installationpipinstallg3hardwareUsage# TODOLicenseThis project is licensed under the MIT License - see theLICENSEfile for details.
Package: g3t
g3tFork of Antonio Ragagnin's g3t repository (https://github.com/kyleaoman/g3t), turning it into an installable python package.Installation:From pypi:'pip install g3t'From github:Download via web UI, or 'git clonehttps://github.com/kyleaoman/g3t.git'Install dependencies if necessary (see setup.py).Global install (Linux):cd to directory with 'setup.py'run 'sudo pip install -e .' (-e installs via symlink, so pulling repository will do a 'live' update of the installation)User install (Linux):cd to directory with 'setup.py'ensure '~/lib/python3.7/site-packages' or similar is on your PYTHONPATH (e.g. 'echo $PYTHONPATH'), if not, add it (perhaps in .bash_profile or similar)run 'pip install --prefix ~ -e .' (-e installs via symlink, so pulling repository will do a 'live' update of the installation)cd to a directory outside the module and launch python; you should be able to do 'from g3t import *'
Package: g3t-etl
g3t_etlTransforming Research Data to FHIRUse caseMeasurements (Observations) are a central element in healthcare, used to support diagnosis, monitor progress, determine baselines and patterns and even capture demographic characteristics, as well as capture results of tests performed on products and substances.As aACED data contributor, I have a rich set of measurements that I need to associate with several possible resources [Patient, Specimen, Procedure, Condition, etc.]These Observations are stored in a csv file and I need to transform them into FHIR resources.Note: For other use cases, without a rich set of measurements, see theadding metadata workflowin the ACED documentation.Project OverviewThis project implements an theTransformstep of the ETL (Extract, Transform, Load) pipeline for processing research into a FHIR resources.
It provides framework with robust command-line and plugin architecture. It empowers users to process diverse data, apply custom transformations, and load it into target destinations.TransformersCore framework provides foundational transformations (e.g., normalization, validation, and graph construction).
Users can develop custom transformers as plugins for unique needs.To use this project, please refer to theproject documentationfor detailed instructions on how to use the project.ContributingThis project is open to contributions from the research community. If you are interested in contributing to the project, please contact the project team.
See thecontributing guidefor more information on how to contribute to the project.
Package: g42so
g42soThis isg42so, a simple Python script that compilesGeant4detector-construction and
primary-generator-action classes, wraps them in C-style (unmangled) adapter
functions and produces a shared library. The library can then be loaded viadlopenby third-party code, allowing instantiation of a Geant4 detector
construction or primary generator action even if the name of the specific class
is not known in advance.Installingg42soThe recommended installation procedure forg42sois to usepip:$ pip install g42soQuick tutorialCompilation is delegated tog++by default (no, I did
not reimplementgccfrom scratch), but this can be configured using the-coption. Note however thatg42somust know what compilation flags to use for
your compiler; at the moment, it only recognizesg++andclang++.Runningg42so -hgives a list of available options. You will typically want
to run something along the lines of the following:$ g42so -I /path/to/include/ \
   /path/to/src/MyDetectorConstruction.cc /path/to/src/MyPrimaryGeneratorAction.ccNotesGeant4 must be installed and thegeant4-configscript must be in the$PATH, or its location can be specified with the--geant4-configoption.g42sotries to automatically detect the names of the classes you want to
wrap.  If it fails or is unsure, it will ask you to explicitly specify your
class names.If your class constructors require arguments, you will need to customise the
C wrappers generated by the code. First run$ g42so --dump-detector-wrapper >detectorWrapper.ccto dump the relevant wrapper. Modify it to your needs and pass it tog42soalong with the--custom-detector-wrapperoption, which tellsg42sonot to
include its default wrapper. For instance:$ g42so --custom-detector-wrapper -I /path/to/include/ \
  /path/to/src/MyDetectorConstruction.cc detectorWrapper.ccThe--dump-pga-wrapperand--custom-pga-wrapperdo the same job for
primary-generator-action classes.Note thatdlopening shared libraries that link to Geant4 is likely to fail
if Geant4 was compiled is multi-threaded mode (theGEANT4_BUILD_MULTITHREADEDCMake flag is set toON) with the default
value for theGEANT4_BUILD_TLS_MODEL(the default isinitial-exec). If
you want todlopenthe libraries created byg42so(which is the whole
point of this tool, really!), then you should make sure that either Geant4
was compiled in single-threaded mode, orGEANT4_BUILD_TLS_MODELwas set toglobal-dynamic.
Package: g4edge-testdata
g4edge test dataInstall (with pip):$python-mpipinstallg4edge-testdataUsageInstantiating aG4EdgeTestDataobject:fromg4edgetestdataimportG4EdgeTestDatag4data=G4EdgeTestData()Clonesg4edge/testdatain a temporary
location (not preserved across system reboots), unless the environment variableG4EDGE_TESTDATAis set and points to the location of an existing
g4edge/testdata clone.Alternatively, the path to an existing g4edge/testdata clone can be provided to
the class constructor:fromg4edgetestdataimportG4EdgeTestDatag4data=G4EdgeTestData("path/to/g4edge/testdata")Access to data files is provided through the square brackets operator:>>>g4data["gdml/001_box.gdml"]PosixPath('/tmp/g4edge-testdata-gipert/data/gdml/001_box.gdml')
Package: g4l
g4lgpio for linux (tested with jetson tx2, nano)link :https://gitlab.com/telelian/peripheral-library/g4lUsageclassGpio(num)parameternum : gpio numbermethodsGpio.direction(dir)parametersdir : pin's direction ( Gpio.IN, Gpio.OUT )Gpio.edge(edge)parametersedge : interrupt edge (Gpio.NONE, Gpio.RISING, Gpio.FALLING, Gpio.BOTH)Gpio.input()returnsinput valueGpio.output(value)parametersvalue : output valueGpio.setisr(isr)parametersisr : interrupt service routines's callback functionexampleinput interruptfromtimeimportsleepfromg4limportGpioprint('g4l example')gpio=Gpio(100)gpio.direction(Gpio.IN)gpio.edge(Gpio.RISING)gpio.setisr(lambda:print('gpio isr'))print('loop start - toggle gpio')cnt=0whileTrue:print(f'loop{cnt}')cnt+=1sleep(5)
Package: g4l-smc
Smallest Maximizer CriterionWe introduce a new criterion to select in a consistent way the probabilistic context tree generating a sample. The basic idea is to construct a totally ordered set of candidate trees. This set is composed by the "champion trees", the ones that maximize the likelihood of the sample for each number of degrees of freedom. The smallest maximizer criterion selects the infimum of the subset of champion trees whose gain in likelihood is negligible. In addition, we propose a new algorithm based on resampling to implement this criterion.This study was motivated by the linguistic challenge of retrieving rhythmic features from written texts. Applied to a data set consisting of texts extracted from daily newspapers, our algorithm identifies different context trees for European Portuguese and Brazilian Portuguese. This is compatible with the long standing conjecture that European Portuguese and Brazilian Portuguese belong to different rhythmic classes. Moreover, these context trees have several interesting properties which are linguistically meaningful.Requirementspython 3.8Installation`pip install -r requirements.txt`ExamplesEstimation by pruningrunpython3 examples/estimation_by_pruning.pyCitingPlease cite the following publication when using this algorithm:Galves, Antonio & Galves, Charlotte & Garcia, Jesus & Garcia, Nancy & Leonardi, Florencia. (2009). Context tree selection and linguistic rhythm retrieval from written texts. The Annals of Applied Statistics. 6. 10.1214/11-AOAS511.Bibtex version:@article{article,
author = {Galves, Antonio and Galves, Charlotte and Garcia,
          Jesus and Garcia, Nancy and Leonardi, Florencia},
year = {2009},
month = {02},
pages = {},
title = {Context tree selection and linguistic rhythm retrieval from written
texts},
volume = {6},
journal = {The Annals of Applied Statistics},
doi = {10.1214/11-AOAS511}
}Running testsRunpytest -sLicenseThe code in this repository is licensed underGNU General Public License v3.0AcknowledgementThis implementation was produced as part of the activities of FAPESP Research, Innovation and Dissemination Center for Neuromathematics (grant # 2020/04807-0, S.Paulo Research Foundation).Universidade de São PauloInstituto de Matemática e EstatísticaResearch, Innovation and Dissemination Center for Neuromathematics -NeuroMat2020
Package: g5-lambda-psycopg2
This is a custom compiled psycopg2 C library for Python. Due to AWS Lambda
missing the required PostgreSQL libraries in the AMI image, we needed to
compile psycopg2 with the PostgreSQLlibpq.solibrary statically linked
libpq library instead of the default dynamic link.### How to useThis project only exists for python 3.7. The subsequent pypi package will only support python 3.7 as well.
It only includes thewith_ssl_supportversion. Since that will generally be required for AWS lambda usage.### Building from source
Go to the original package if you wish to modify this from source
Package: g711
G711 A-Law / u-Law audio-coding libraryThe library is written as an extension for python3 and allows to work simply with G711 encoded audio.RequirementsPython 3.5+Numpy (will be installed anyway before the building procedure)Tools for building C/C++ applications (GCC/Clang/VS build tools)Implementation detailsThe library is written in pure C and relies exclusively on a python build system. I tried to minimize the use of any platform-dependend functions to provide a truly cross-platform and fast library.InstallationSource distribution is uploaded to PyPI, so just invokepip install g711. Equivalently, you can clone code fromhttps://github.com/stolpa4/g711and then runpip install <path to cloned repo>.Functionsload_alaw(path: Union[str, os.PathLike]) -> numpy.ndarray(dtype=numpy.float32)- Opens a file, loads its contents and decodes it from A-Law to float32 numpy array.load_ulaw(path: Union[str, os.PathLike]) -> numpy.ndarray(dtype=numpy.float32)- Same for u-Law.save_alaw(path: Union[str, os.PathLike], audio_data: numpy.ndarray(dtype=numpy.float32)) -> bool- Encodes an array to A-Law and writes bytes to a specified file. audio_data can be anything convertible to numpy.ndarray(dtype=numpy.float32).save_ulaw(path: Union[str, os.PathLike], audio_data: numpy.ndarray(dtype=numpy.float32)) -> bool- Same for u-Law.decode_alaw(encoded_bts: bytes) -> numpy.ndarray(dtype=numpy.float32)- Decodes raw A-Law bytes to float32 audio.decode_ulaw(encoded_bts: bytes) -> numpy.ndarray(dtype=numpy.float32)- Same for u-Law.encode_alaw(audio_data: numpy.ndarray(dtype=numpy.float32)) -> bytes- Encodes an array to A-Law and returns bytes object. audio_data can be anything convertible to numpy.ndarray(dtype=numpy.float32).encode_ulaw(audio_data: numpy.ndarray(dtype=numpy.float32)) -> bytes- Same for u-Law.
Package: g85
g85 READMEg85is a Python module for reading and writing to the G85 XML wafer map format.LinksSource repositoryPyPIInstallationRequirements:python >= 3.7 (written and tested with 3.9)numpyInstall with pip:pip3installg85Alternatively, install from gitpip3installgit+https://mpxd.net/code/jan/g85.git@releaseExamples