Saravanan666/pypi-org huggingface dataset:
Package: gt-webcore
gt-webcoreFeatures自动序列化接口返回值为JSON结构；集成了SQLAlchemy、MongoEngine对象映射框架；统一的接口返回值结构；提供简单完善可扩展的接口参数验证机制；完善的异常处理机制；模块化方式加载应用模块，每个应用独立一个蓝图配置；InstallWith pip::: pip install gt-webcoreConfigrationMODULES - 加载模块列表{'name':'app.resource','package':'resource'}LOGGER_CONFIG - 日志配置字典日志配置可以参考 python logging 的配置说明；SQLAlchemy 配置具体可以参考Flask-SQLAlchemy的配置说明，示例如下：SQLALCHEMY_ENGINE_OPTIONS={'pool_recycle':3600,'pool_timeout':15,'pool_pre_ping':True,'pool_size':5}SQLALCHEMY_DATABASE_URI='mysql+pymysql://root:pwd@host:port/database?charset=utf8'MongoEngine 配置
配置项参考Flask-MongoEngine的配置说明，示例如下：MONGODB_SETTINGS={'host':'localhost','port':27017,'db':'demo'}Celery 配置配置项参考 Celery 配置文档说明，示例如下：CELERY={'celery_broker_url':'redis://guest@localhost:6379','result_backend':'redis://guest@localhost:6379','task_routes':{'app.system.controller.*':{'queue':'test'}}}Cache 配置
配置项参考Flask-Caching的配置说明，示例如下：CACHE_TYPE='RedisCache'CACHE_DEFAULT_TIMEOUT=300CACHE_REDIS_URL='redis://localhost:6379/2'Runfromwebcoreimportcreate_app,release_appdefdebug_instance():fromconfig.developimportDevelopConfigreturncreate_app(DevelopConfig())defproduction_instance():fromconfig.productionimportProductionConfigreturncreate_app(ProductionConfig())if__name__=='__main__':app=debug_instance()app.run(host='0.0.0.0',port=5002,debug=True)release_app()
Package: gtx
Ground Truth eXplanation DatasetPlease run thesetup.shfile to downlad the datasets.Please runconda env create --name hddds --file environment.ymlto install the necessary packages.Please find the notebookexample.ipynbfor the sample access to our dataset and potential use of dataloaders.Please find the code for experiments inhddds.py(which is going to be slow). The detailed code is consist of three parts, and separated in three files:experiments/train.py: training the predictive models;experiments/get_explanations.py: generating the explanations using different feature atrribution methods;experiments/summary.py: evaluating the performance of the explanations against ground truth.PS: If you ever wonder why there are so many 'd's inhddds, it is pinyin forHao Da De DataSet(very large dataset) :)
Package: guac
Monadic Do-NotationGuac provides monadic do-notation, inspired by Haskell, in Python. Monads provide “programmable semicolons” by which the behavior of programs can be changed. A common, useful monad is the list monad, which represents non-deterministic computations. The list monad makes it very easy to write backtracking searches.RequirementsGuac requires an implementation of Python 3 that supportscopy.deepcopyon generator functions. The most common distribution, CPython, is lacking this feature, but pypy implements it!ExampleHere’s an example that computes all the possible ways you can give $0.47 change with pennies, nickels, dimes, and quarters:fromguacimport*@monadic(ListMonad)defmake_change(amount_still_owed,possible_coins):change=[]# Keep adding coins while we owe them money and there are still coins.whileamount_still_owed>0andpossible_coins:# "Nondeterministically" choose whether to give anther coin of this value.# Aka, try both branches, and return both results.give_min_coin=yield[True,False]ifgive_min_coin:# Give coinmin_coin=possible_coins[0]change.append(min_coin)amount_still_owed-=min_coinelse:# Never give this coin value again (in this branch!)delpossible_coins[0]# Did we charge them the right amount?yieldguard(amount_still_owed==0)# Lift the result back into the monad.yieldlift(change)print(make_change(27,[1,5,10,25]))Running this program will print a list of lists, each list containing a different set of numbers that add up to 27. You can imagine lots of cool ways this could be used, from unification to parsing!To learn more, check out the README.
Package: guacamole
============================================================Guacamole - Framework for Creating Command Line Applications============================================================.. image:: https://badge.fury.io/py/guacamole.png:target: http://badge.fury.io/py/guacamole.. image:: https://travis-ci.org/zyga/guacamole.png?branch=master:target: https://travis-ci.org/zyga/guacamole.. image:: https://pypip.in/d/guacamole/badge.png:target: https://pypi.python.org/pypi/guacamoleTools, done right=================Guacamole is a LGPLv3 licensed toolkit for creating good command lineapplications. Guacamole that does the right things for you and makes writingapplications easier... testsetup::import guacamole.. doctest::>>> class HelloWorld(guacamole.Command):...     """A simple hello-world application."""...     def register_arguments(self, parser):...         parser.add_argument('name')...     def invoked(self, ctx):...         print("Hello {0}!".format(ctx.args.name))Running it directly is as simple as calling ``main()``:.. doctest::>>> HelloWorld().main(['Guacamole'], exit=False)Hello Guacamole!0What you didn't have to do is what matters:- configure the argument parser- define and setup application logging- initialize internationalization features- add debugging facilities- write a custom crash handlerFeatures========* Free software: LGPLv3 license* Documentation: https://guacamole.readthedocs.org.* Create command classes and run them from command line.* Group commands to create complex tools.* Use recipes, ingredients and spices to customize behaviorHistory=======0.9.2 (2015-08-06)------------------* Fix https://github.com/zyga/guacamole/issues/110.9.1 (2015-08-06)------------------* Fix https://github.com/zyga/guacamole/issues/90.9 (2015-05-11)----------------* Vastly improved documentation* Bugfixes and changes based on early feedback* New cmdtree module with two ingredients (for instantiating commands and fordispatching the invoked method)* Simplified argparse ingredient (for just handling parser)* Unit tests and doctests for some of the functionality0.8 (2015-04-21)----------------* First release on PyPI.2012-2015---------* Released on PyPI as a part of plainbox as ``plainbox.impl.clitools``,``plainbox.impl.logging``, ``plainbox.i18n`` and``plainbox.impl.secure.plugins``.
Package: guacamole-api-wrapper
Guacamole Wrapper PackageThis is a simple package that allows you to take advantage of all
currently available REST API calls within Apache Guacamole.OverviewThis package creates a class namedsessionallowing you to interact
with the REST API for Apache Guacamole in various ways. Full capabilities
include:Generating and Deleting your REST API Auth tokenUsers & UserGroupslist, create, update, deleteConnection & ConnectionGroupslist, create, update, deleteList Schema InfolistSharing Profileslist, create, deleteWork in ProgressCode EnhancementsCI/CD for auto deploymentInstallpip install guacamole-api-wrapperUsageThe overall usage capabilities of this module are extensive, I would
recommend you leverage a good ide that can show all available functions
and arguments. I tried to ensure each function has a basic comment and
I have tested all functionality, but am always looking for ways to break
it in order to improve it.Initial Module Import:import guacamoleDefining session arguments and then list userssyntax:guacamole.session("https://{guacamole_base_url}", "{datasource}", "{username}", "{password}")example:session = guacamole.session("https://web.app/guacamole", "mysql", "guacadmin", "guacadmin")

session.list_users()
Package: guacamoleBank
GuacamoleBank============This code is for academic purpose. It's supposed to be a very simple simulation of a Bank system. It's developed over Python3. To install it: simply clone it and run it with `python3 main.py`### The features of the app are: ###* Manage clients* Manage accounts* Manage bank logs* Get account info by client* Get account info by date* Login* Send and receive money### The dependencies ###This product it's developed over Python3, so need that version of.We use our own module to convert the currencies, you can find it at the `assets/vendor/` directory.The data is stored at documents disk-based JSON system. You can find that files at `data/` directory.This code should follow the PYPI standards.
Package: guacamole-cli
A command line interface forhttps://github.com/Antojitos/guacamoleTested with Python 2.7 and 3.4Install$ pip install guacamole-cliUsageUploading a fileTo upload a file you need to specify your Guacamole server URL and a filename, for example:$ guacamole screenshot.jpg
http://guacamole.antojitos.io/files/TRPm/0lkq/6egk/yHgg/OeDg/fVHr/screenshot.jpgCommand optionsUse--helpto show the command options:$ guacamole --help
usage: guacamole [-h] [-c CONFIG_FILE] [-e ENDPOINT] [-s SHORTENER] filename

positional arguments:
  filename              file to upload

optional arguments:
  -h, --help            show this help message and exit
  -c CONFIG_FILE, --config-file CONFIG_FILE
                        Specify a configuration file
  -e ENDPOINT, --endpoint ENDPOINT
                        Guacamole endpoint URL
  -s SHORTENER, --shortener SHORTENER
                        Tamales endpoint URLConfiguration fileBy default the command line interface looks for a configuration file in~/.guacamole.conf. You can also specify an alternative configuration
file using the--config-filecommand line option.Here’s an example:[general]
endpoint = http://guacamole.antojitos.io/files/

# an empty value disable the URL shortener service
shortener = http://t.antojitos.io/api/v1/urlsTestsIn order to execute the test suite you need to run the next commands:pip install -r requirements-dev.txt
python tests/main.py
Package: guacamoleETL
guacamoleETL - DocumentAn ETL pipeline tool thatpre-processextracts data from a .txt file (Challenge_me.txt)cleans up the data with invalid informationtransforms the data through given specifications into a matrix (list of lists)loads the data into a .csv file (output.csv)InstallationThis tool can be installed withpipCopy-paste and run this command in the terminalpip install guacamoleETLUsageThis ETL pipeline can be part of predictive model training and feed the data directly to the modelimportguacamoleETLdataFile='Challenge_me.txt'guacamoleETL.load(dataFile)result=guacamoleETL.transform(dataFile)predictive_model=model_training(result)Functionsextract_data(txt_file):Extract data from a .txt file to a temporary .csv fileLeading or trailing whitespace are removed during the extractionclean_up():Clean up the data with invalid informationRows with the placeholder '-' (NA) in any of the specified columns are excludedtransform(path):Transform the data from pre-process through given specifications into a matrixengine-locationis split into two columns,engine-location_frontandengine-location_rearand one-hot-encodednum-of-cylindersis transformed from word into integer through a pre-defined dictionaryengine-sizeis transformed into integerweightis transformed into integerhorsepoweris transformed from German decimal notation string into float numberaspirationis modified asaspiration_turboso that turbo engines are marked as 1priceis converted from minor units to major unitsmakeis not transformed but kept in the datasetload(path):Load the data from previous transformation into a .csv fileArchitectureAll the functions are implemented in the__init__.py, this decision is made based on the following reasons:After the package is imported, if we want to use the transform and load functions directly as sub-module, the functions must be imported or defined in__init__.py.Since they are all connected to each other, such as the transform function takes the result from pre-process (extract and clean up) and the load function also takes the result from transform function, it's easier to follow the flow if they are all in the same file.This might not be the best architecture implementation, but while starting from small, simplicity is always a good consideration.
Package: guachi
When projects start to grow, the need for a globally accessible configuration
manager is obvious.Having configurations mapped to dictionaries is really useful, but can create a
problem with memory.Guachinot only holds persistent dictionaries on disk, but it also maps
INI style keys to dictioanry keys, and can fill in the default values if some
of them are missing.You do not need to know anything about howguachistores the values, just
treat it like a regular dictionary!User InteractionLet’s assume you are dealing with a Twitter application that uses ainifile.
This is a sampla INI file and how it looks:[DEFAULT]

app.twitter.username = alfredodeza
app.update.frequency = 60
app.load.startup = FalseWe have a username, a frequency and a different setting for the startup option.Lets deal with that:ini_file = ``/Users/alfredo/.twwiter.ini``
conf = ConfigMapper(config_db_path)
conf.set_config(ini_file)That’s it! At this point,guachihas parsed the config file and stored the values.Lets query them calling our keys:>>> db_conf = conf.stored_config()
>>> db_conf['frequency']
60Great, we now are making sure we have our data. We can actually get that value from anywhere
in our twitter app by calling it this way:db = ConfigMapper(config_db_path)
conf = db.stored_config()

frequency = conf['frequency']Getting DeafultsAbove we inspected an INI file with some changed values. But what happens when the user
has none?Since we set our defaults, we can be sure they are right there in case our app needs
it in some sub-module:>>> db = ConfigMapper(config_db_path)
>>> conf = db.stored_config()
>>> conf['load']
TrueUpdating ValuesWhat if a user makes changes? We can always save and update what we read from the INI
file at load time, to make sure we have the latest changes from the user:conf = ConfigMapper(config_db_path)
conf.update_config(ini_file)DocumentationOur full Documentation is hosted here. Go take a look for the full API.http://guachi.googlecode.com/hg/docs/build/html/index.html
Package: guacli
guacliA python client (library and CLI) for the Apache Guacamole front-end REST API.RequirementsTested with python 3.10.2 and 3.6.9.Installpip install guacliExample of useguacli --help
guacli --url "https://example.com/guacamole" --user guacadmin create user james-smithUpgradepip install --upgrade guacliUninstallpip uninstall guacliManually installcd /opt
git clone https://github.com/chaimeleon-eu/guacamole-python-client.git
mv guacamole-python-client/guacli/cli.py guacamole-python-client/cli
chmod +x guacamole-python-client/cli
ln -s /opt/guacamole-python-client/cli /usr/local/bin/guacliFor developersRun without installpython -m guacli.cli --helpTest setupTest the setup.py:pip install --log install.log .Uninstall with:pip uninstall guacliBuild the packageREF:https://packaging.python.org/en/latest/tutorials/packaging-projects/Requirements:python -m pip install --upgrade build
python -m pip install --upgrade twineBuild:cd guacamole-python-client
python -m build
ls distTwo files are generated:guacli-VERSION.tar-gz is the source packageguacli-VERSION-py3-none-any.whl is the built packageThen upload the package:python -m twine upload dist/*If you want to test previously, add--repository testpypifor uploading to test.pypi.org.
Package: guaijiao
A sample project that exists as an aid to thePython Packaging User Guide’sTutorial on Packaging and Distributing
Projects.This projects does not aim to cover best practices for Python project
development as a whole. For example, it does not provide guidance or tool
recommendations for version control, documentation, or testing.The source for this project is available here.Most of the configuration for a Python project is done in thesetup.pyfile, an example of which is included in this project. You should edit this
file accordingly to adapt this sample project to your needs.This is the README file for the project.The file should use UTF-8 encoding and be written usingreStructuredText. It
will be used to generate the project webpage on PyPI and will be displayed as
the project homepage on common code-hosting services, and should be written for
that purpose.Typical contents for this file would include an overview of the project, basic
usage examples, etc. Generally, including the project changelog in here is not
a good idea, although a simple “What’s New” section for the most recent version
may be appropriate.
Package: guake
IntroductionGuake is a python based dropdown terminal made for the GNOME desktop environment. Guake’s style of window is
based on an FPS game, and one of its goals is to be easy to reach.Quick Installation GuidePlease refer toInstallation GuideWhat it looks like ?Drop down terminal on pressing <F12>Note when compiling from sourceDoNOTuse the Tarball packages automatically generated by GitHub on the Release pages. They
won’t work because one of the main components of Guake build system, PBR, requires the full Git
history to be available when building from source. Note this does not impact source distribution
packages you can download from Pypi.Build from sources instructions are described onthis page of the Online Documentation.
Please read this carefully before opening an issue!Bugs? Information?Source Code available onGitHub.Official Homepage:http://guake-project.orgOnline Documentation is hosted onReadTheDocs.If you are not a developer, you can still contribute to Guake byimproving its translations in your language.
Guake users are welcometo support Weblatein providing this
service for free for OpenSource Projects.Important note: DoNOTuse the domain guake.org, it has been registered by someone outside
the team. We cannot be held responsible for the content on that web site.This project was originally created by Gabriel Falcão, see:https://sourceforge.net/projects/guake-gnome-vte/
Package: guan
Guan is an open-source python package developed and maintained byhttps://www.guanjihuan.com/about(Ji-Huan Guan, 关济寰). The primary location of this package is on websitehttps://py.guanjihuan.com. The GitHub location of this package is onhttps://github.com/guanjihuan/py.guanjihuan.com.
Package: guanaco
guanacoPython library for doing 3D CTF correctionInstallationIn order to build this package, the following dependencies are required:The CUDA toolkitFFTWTo install from the github repository do the followingexportCUDACXX=${PATH_TO_CUDA}/bin/nvcc
python-mpipinstallgit+https://github.com/rosalindfranklininstitute/guanaco.git@masterTo install from source, clone this repository. The repository has a submodule
for pybind11 so after cloning the repository rungitsubmoduleupdate--init--recursiveThen do the following:exportCUDACXX=${PATH_TO_CUDA}/bin/nvcc
python-mpipinstall.If you would like to run the tests then, clone this repository and then do the following:exportCUDACXX=${PATH_TO_CUDA}/bin/nvcc
python-mpipinstall.[test]Installation for developersTo install for development, clone this repository and then do the following:exportCUDACXX=${PATH_TO_CUDA}/bin/nvcc
python-mpipinstall-e.TestingTo run the tests, follow the installation instructions for developers and then do the following:pytestUsageTo do a tomographic reconstruction with no CTF correction do something do the followingguanaco-iimages.mrc-orec.mrc-dgpuTo correct all images with the same single defocus something do the followingguanaco-iimages.mrc-orec.mrc-dgpu--df=20000--Cs=2.7To correct all images with the same defocus range something do the followingguanaco-iimages.mrc-orec.mrc-dgpu--df=20000--Cs=2.7--ndf=10IssuesPlease use theGitHub issue trackerto submit bugs or request features.LicenseCopyright Diamond Light Source and Rosalind Franklin Institute, 2021Distributed under the terms of the GPLv3 license, guanaco is free and open source software.
Package: guancodes
Guan CodesA simple package for generating Gray and Guan codes.SummaryGetting StartedRunning the testsVersioningAuthorsLicenseAcknowledgmentsGetting StartedSo far, to get the project one only needs to download it from therepository(or any other source).It's also possible to download it as a package withpip install guancodeswhich will download the package frompypi.PrerequisitesTo run the scripts there will be needed some version of Python. During the development
I'm using 3.8, but I believe that it will also work just fine with some earlier or newer
version (at least for now).In some places I usetypingpackage, that's why 3.8 version is desirable.Code styleThroughout this work PEP-8 will be used. There are several cases where this may go south.In some versions of the code matrices may be denoted by capital letters (as in
standard mathematical notation). In order to be more PEP-friendly I'll try to use prefix
m_ instead of capital letters, e.g. m_u would be the equivalent of U. Alternatively
explicit use of mathematical notation is also acceptable.Running the testsJust run all test intestsfolder withpytest.Note that (for now) there are no unit tests. Just simple sanity check of returned
results.VersioningI'll useSemVerfor versioning and try to keep track of the version in the tags.AuthorsTomasz RybotyckiBillie Thompson-Provided README TemplateLicenseThis project is licensed under theApache License, v.2.0.
See theLICENSE.mdfile for details.AcknowledgmentsCTP PAS- This project was done
during my Ph.D. at CTP PAS.
Package: guang
GuangUniversal function library of scientific calculation.RequirementsPython3CUDA>=10.0PyTorch>=1.0Tensorflow>=1.12.0opencv-pythonpydublibrosapyworldsoundfilepypinyinpomegranatepython-LevenshteinstreamlitpyprobarfireInstallation# Before install `guang`, you need to have all the requirements installed.pipinstallguang​NightlyBuildgitclonehttps://github.com/beidongjiedeguang/guang.gitcdguang
python./night_workflow.pyExamplesConvert audio in .mp3/ .wav format to (sample rate=16k, single channel) .wav formatUse in bash/shellguangcvt2wavINPUTOUTPUTUse as functionfromguang.Voice.convertimportcvt2wavcvt2wav(input_name,output_name,sr=16000)# Multi-processfromguang.Voice.convertimportmulti_cvt2wavmulti_cvt2wav(PATH1,PATH2,sr=16000,n_cpu=None)Let the video play at N times speed(install ffmpeg first)guangav_speedinputnameoutputnameN--cut_frame=FalseFourier visualizationguangfourierFourier draw anything you wantFFT  convolutionfromguang.sciimportfftA=np.random.rand(100,100)B=np.random.rand(100,100)fft.fft_conv2d(A,B)Usedict_dotableto convert a dictionary to dot-able dictionary:fromguang.Utils.toolsFuncimportdict_dotablea={'a':{'b':1}}a=dict_dotable(a)print(a.a.b)>>1Useprobarto display current progresshas separated topyprobarfromguang.Utils.barimportbar,probarforidx,xinprobar(range(10)):time.sleep(0.8)>>100.00%|█████████████████████████████|0'7.2"|0'7.2" ETC: 12-2 23:59:8N=1024a=np.linspace(2,5,N)foridx,iinenumerate(a):time.sleep(0.01)bar(idx,N)>>100.00%|█████████████████████████████|0:00:00|0:00:10ETC:02-1920:33:34@broadcastbroadcast a non-broadcast function.fromguang.Utils.toolsFuncimportbroadcast@broadcastdeff(x):# A function that can map only a single elementifx==1orx==0:returnxelse:returnf(x-1)+f(x-2)>>f([2,4,10])>>array([1,3,832040],dtype=object)downloaddownload files from google drive.fromguang.Utils.googleimportdownloadurl="https://drive.google.com/open?id=1eU57Fkv1DBEOqi-iOs1AebD02FqVDY23"outname="filename.zip"download(url,outname)txt2phConvert Chinese characters to phoneme.fromguang.Voice.txt2pinyinimporttxt2phtxt2ph('你好，我是光')>>[('n','i3'),('h','ao3'),('sp1',),('uo3',),('sh','ii4'),('g','uang1')]reduce_from_durationRemove files with duration less thanleast_timeseconds.
Note that this function does not work in the interactive interpreter because it usesmultiprocessing.pool.Poolfromguang.Voice.reduceimportreduce_from_durationreduced_list=reduce_from_duration(path_list,least_time=2)print(len(path_list),len(reduced_list))>>(6889,6714)Find NOT silence part of a sound file:find_no_silencefromguang.Voice.reduceimportfind_no_silencestart,end,arg_start,arg_end=find_no_silence(filename)Download wechat files.fromguang.wechat.Utils.downloadimportdownloadsdownloads(nickName='caloi',fileType='mp3',d_t=60)Plots 3D Scatter:fromguang.Utils.plotlyimportScatter3dfromguang.Utils.interestingimportLorenztrace=Lorenz.Trace()x,y,z=trace[:,0],trace[:,1],trace[:,2]fig=Scatter3d()fig.scatter3d(x,y,z,mode="lines+markers",color_line=z,color_marker=None,marker_size=2)fig.show()Data dimension reduction:cdguang/ML/manifold
pythontest_digits.pypythontest_s_curve:smiley: