Saravanan666/pypi-org huggingface dataset:
Package: pyglove
PyGlove: Manipulating Python ProgramsGetting started|Installation|Examples|Reference docsWhat is PyGlovePyGlove is a general-purpose library for Python object manipulation.
It introduces symbolic object-oriented programming to Python, allowing
direct manipulation of objects that makes meta-programs much easier to write.
It has been used to handle complex machine learning scenarios, such as AutoML,
as well as facilitating daily programming tasks with extra flexibility.PyGlove is lightweight and has very few dependencies beyond the Python interpreter.
It provides:A mutable symbolic object model for Python;A rich set of operations for Python object manipulation;A solution for automatic search of better Python programs, including:An easy-to-use API for dropping search into an arbitrary pre-existing Python
program;A set of powerful search primitives for defining the search space;A library of search algorithms ready to use, and a framework for developing
new search algorithms;An API to interface with any distributed infrastructure (e.g.Open Source Vizier) for such search.It's commonly used in:Automated machine learning (AutoML);Evolutionary computing;Machine learning for large teams (evolving and sharing ML code, reusing
ML techniques, etc.);Daily programming tasks in Python (advanced binding capabilities, mutability,
etc.).PyGlove has beenpublishedat NeurIPS 2020. It is widely used withinAlphabet, including Google Research, Google Cloud, Youtube and Waymo.PyGlove is developed by Daiyi Peng and colleagues inGoogle Brain Team.Hello PyGloveimportpygloveaspg@pg.symbolizeclassHello:def__init__(self,subject):self._greeting=f'Hello,{subject}!'defgreet(self):print(self._greeting)hello=Hello('World')hello.greet()Hello, World!hello.rebind(subject='PyGlove')hello.greet()Hello, PyGlove!hello.rebind(subject=pg.oneof(['World','PyGlove']))forhinpg.iter(hello):h.greet()Hello, World!Hello, PyGlove!Installpip install pygloveOr install nightly build with:pip install pyglove --preExamplesAutoMLNeural Architecture Search on MNISTNAS-Bench-101NATS-BenchEvolving Reinforcement Learning AlgorithmsEvolutionFramework: [Algorithm]
[Ops]
[Fine Control]Travelling Salesman ProblemOne-Max ProblemSymbolic function regression withpg.mutfunMachine LearningScalably exchanging ML ideasSymbolic Machine LearningSymbolic Neural ModelingAdvanced Python ProgrammingSticky Notes: A mini Domain-specific LanguageInteractive SVG: Components for Direct ManipulationWhere is the Duck: Developing Context-aware ComponentCiting PyGlove@inproceedings{peng2020pyglove,
  title={PyGlove: Symbolic programming for automated machine learning},
  author={Peng, Daiyi and Dong, Xuanyi and Real, Esteban and Tan, Mingxing and Lu, Yifeng and Bender, Gabriel and Liu, Hanxiao and Kraft, Adam and Liang, Chen and Le, Quoc},
  booktitle={Advances in Neural Information Processing Systems (NeurIPS)},
  volume={33},
  pages={96--108},
  year={2020}
}Disclaimer: this is not an officially supported Google product.
Package: pyglowworm
文档API案例帮助利器使用帮助文档导入包，其中最重要的一个API：find方法fromglowwormimportfind如果find方法不带有任何参数，默认显示前5个小例子find()输出：未输入查询关键词，默认显示前5个小例子Example--------1常见算术运算x,y=3,2print(x+y)# = 5print(x-y)# = 1print(x*y)# = 6print(x/y)# = 1.5print(x//y)# = 1print(x%y)# = 1print(-x)# = -3print(abs(-x))# = 3print(int(3.9))# = 3print(float(x))# = 3.0print(x**y)# = 9Example--------2实现relux:输入参数return：输出relu值在神经网络中，relu作为神经元的激活函数测试：relu(5)# 5relu(-1)# 0Example--------3进制转化十进制转换为二进制：In[2]:bin(10)Out[2]:'0b1010'十进制转换为八进制：In[3]:oct(9)Out[3]:'0o11'十进制转换为十六进制：In[4]:hex(15)Out[4]:'0xf'Example--------4整数和ASCII互转十进制整数对应的ASCII字符In[1]:chr(65)Out[1]:'A'查看某个ASCII字符对应的十进制数In[1]:ord('A')Out[1]:65输入查询关键词：互转find('互转')查询得到结果：找到1个包含"互转"的例子Example--------4整数和ASCII互转十进制整数对应的ASCII字符In[1]:chr(65)Out[1]:'A'查看某个ASCII字符对应的十进制数In[1]:ord('A')Out[1]:65输入关键词十进制find('十进制')查询得到结果：找到2个包含"十进制"的例子Example--------3进制转化十进制转换为二进制：In[2]:bin(10)Out[2]:'0b1010'十进制转换为八进制：In[3]:oct(9)Out[3]:'0o11'十进制转换为十六进制：In[4]:hex(15)Out[4]:'0xf'Example--------4整数和ASCII互转十进制整数对应的ASCII字符In[1]:chr(65)Out[1]:'A'查看某个ASCII字符对应的十进制数In[1]:ord('A')Out[1]:65最新releasev0.1.5
Package: pyglpainter
pyglpainterMinimalistic, modern OpenGL drawing library for technical applications, teaching or
experimentation. It is implemented in Python 3 with Qt 6 bindings (it inherits fromQOpenGLWidget).It provides a simple Python API to draw raw OpenGL primitives (LINES,LINE_STRIP,TRIANGLES, etc.)
as well as a number of useful composite primitives
(see classesGrid,Star,CoordSystem,Text,Circle,Arc,HeightMap,OrthoLineGrid).All objects/items can either be drawn as real
3D world entities (which optionally support "billboard" mode), or as a 2D overlay.The user can interactively navigate using the mouse via the classical Pan-Zoom-Rotate paradigm
implemented via a virtual trackball (using quaternions for rotations).BackgroundThis code was originally written for a CNC application, but then split off
and made more general.This library was developed to produce simple technical visualizations
and minimalistic line drawings in 3D space; it does not implement a hierarchical scene graph.
To be extensible, shader code has to be supplied by the application.It uses the "modern", shader-based, OpenGL API rather than the deprecated "fixed pipeline".Qt has been chosen not only because it provides the GL environment, but also vector, matrix and
quaternion math. A port of this Python code into native Qt C++ would therefore be trivial.InstallationpipinstallpyglpainterUsageThe test directory of the source repository provides a full integration example,
which can also be run for testing.Most of the time, calls toitem_create()are enough to build a 3D world with objects
in it (the name for these objects here is "items"). Items can be rendered using different shader
programs.Mouse NavigationLeft Button drag left/right/up/down:Rotate camera left/right/up/downMiddle Button drag left/right/up/down:Move camera left/right/up/downWheel rotate up/down:Move camera ahead/backRight Button drag up/down:Move camera ahead/back (same as wheel)One particular choice was to hold the camera's field of view constant; "Zooming" can be achieved by
moving the camera forward along its look axis.RequirementsThe Python version is specified in the file.python-versionOpenGL version 2.1 (with GLSL version 1.20)DevelopmentDependencies are managed usingpipenv:pipinstallpipenv--user
pipenvinstall--devTo run the example:PYTHONPATH=srcpipenvrun./test/example.pyBuildingpipenvrunmakebuild_deps
pipenvrunmakedist
Package: pyglplot
pyglplotA powerful Python plotting library that leverages OpenGL to provide exceptional performance and high-quality visualizations of 2D data. Based on the JavaScript librarywebgl-plotthis library is specifically designed for real-time plotting of line, scatter, and histogram plots. This library is cross-platform and works on Windows, Linux and Mac thanks toGLFWwindowing library. Furthermore, It is also compatible with Jupyter notebooks. This package is ideal for plotting realtime data from sensors and instruments, including streaming devices such as microphones and cameras, empowering users to analyze data as it is being generated.Installationpython-mpipinstallpyglplotGetting startedimportnumpyasnpfrompyglplotimportline# Create a Line objectlineSize=1000plotLine=line.Line(lineSize)x=np.linspace(-1,1,lineSize)y=np.sin(x)# Add data to the lineplotLine.updateLine(x,y)plotLine.run()Animating a plotlineSize=1000plotLine=line.Line(lineSize)x=np.linspace(-1,1,lineSize)y=0defupdate():globalyy=0.5*np.sin(10*x)+np.random.rand(lineSize)*0.1plotLine.updateLine(x,y)plotLine.run(update)LicenseMIT
Package: pygls
pygls: The Generic Language Server Frameworkpygls(pronounced like "pie glass") is a pythonic generic implementation of theLanguage Server Protocolfor use as a foundation for writing your ownLanguage Serversin just a few lines of code.Quickstartfrompygls.serverimportLanguageServerfromlsprotocol.typesimport(TEXT_DOCUMENT_COMPLETION,CompletionItem,CompletionList,CompletionParams,)server=LanguageServer("example-server","v0.1")@server.feature(TEXT_DOCUMENT_COMPLETION)defcompletions(params:CompletionParams):items=[]document=server.workspace.get_document(params.text_document.uri)current_line=document.lines[params.position.line].strip()ifcurrent_line.endswith("hello."):items=[CompletionItem(label="world"),CompletionItem(label="friend"),]returnCompletionList(is_incomplete=False,items=items)server.start_io()Which might look something like this when you trigger autocompletion in your editor:Docs and TutorialThe full documentation and a tutorial are available athttps://pygls.readthedocs.io/en/latest/.Projects based onpyglsWe keep a table of all knownpyglsimplementations. Please submit a Pull Request with your own or any that you find are missing.AlternativesThe main alternative topyglsis Microsoft'sNodeJS-based Generic Language Server Framework. Being from Microsoft it is focussed on extending VSCode, although in theory it could be used to support any editor. So this is where pygls might be a better choice if you want to support more editors, as pygls is not focussed around VSCode.There are also other Language Servers with "general" in their descriptons, or at least intentions. They are however only general in the sense of having powerfulconfiguration. They achieve generality in so much as configuration is able to, as opposed to what programming (inpygls'case) can achieve.https://github.com/iamcco/diagnostic-languageserverhttps://github.com/mattn/efm-langserverhttps://github.com/jose-elias-alvarez/null-ls.nvim(Neovim only)TestsAll Pygls sub-tasks require the Poetrypoeplugin:https://github.com/nat-n/poethepoetpoetry install --all-extraspoetry run poe testpoetry run poe test-pyodideContributingYour contributions topyglsare most welcome ❤️ Please review theContributingandCode of Conductdocuments for how to get started.DonatingOpen Law Libraryis a 501(c)(3) tax exempt organization. Help us maintain our open source projects and open the law to all withsponsorship.SupportersWe would like to give special thanks to the following supporters:mpourmpoulisLicenseApache-2.0
Package: pyglslify
pyglslifyA very thin wrapper for theglslifynodejs tool, to usestack.glshader modules in Python during development.(after development you're probably best just compiling the shaders with nodejsglslifycli tool to a file and using the result)InstallationThe whole point is to be able to download and use GLSL shader modules from the WebGL community, which are distributed vianpm.So first you need to install nodejs/npm:https://www.npmjs.com/get-npmThen install theglslifytool globally and verify it is on your path:npm install -g glslify
glslify --helpThen addpyglslifyin your Python project virtualenv:pip install pyglslifyUsageWe're still going to usenpmto install stack.gl shaders. For example:npm install glsl-noiseThis will createpackage.jsonandpackage-lock.jsonfiles in your project root, which will track thenpmdependencies of your project. These should be committed to source control along with the rest of your project. By default the modules will be downloaded to anode_modulesdir in your project root, that dir should be added to.gitignore.If you checkout your project repo on a new machine you can just runnpm installto fetch the modules specified as dependencies inpackage.json.On the Python side you can write GLSL shaders which make use of the glslifyrequirepragma:#pragma glslify: noise = require('glsl-noise/simplex/3d')precisionmediumpfloat;varyingvec3vpos;voidmain(){gl_FragColor=vec4(noise(vpos*25.0),1);}fshader.glslAnd then in your Python code, when you want to pass the shader to your rendering pipeline, usepyglslifyto resolve the pragmas:importmoderngl_windowasmglwfrompyglslifyimportglslifyclassRenderWindow(mglw.WindowConfig):def__init__(self,**kwargs):super().__init__(**kwargs)vertex_shader=self.load_text("shaders/vshader.glsl")fragment_shader=self.load_text(glslify("shaders/fshader.glsl"))self.pipeline=self.ctx.program(vertex_shader=vertex_shader,fragment_shader=fragment_shader,)You can also use glslifySource Transforms.e.g.npm install glslify-hexallows use of CSS-style hex strings for colors in place ofvec3s.See the glslify docs - they recommend specifying these as configuration in yourpackage.json.You can also apply local transforms to the shader file at runtime from Python, by passing their module names as args like:frompyglslifyimportglslifyfragment_shader=glslify("shaders/fshader.glsl","glslify-hex","glslify-import")Happy shading!
Package: pygls-tagls-custom
pyglspygls(pronounced like "pie glass") is a pythonic generic implementation of theLanguage Server Protocolfor use as a foundation for writing language servers using Python (e.g. Python, XML, etc.). It allows you to write your ownlanguage serverin just a few lines of code.Quick IntroIMPORTANT NOTE:In order to support type-checking, we addedpydanticlibrary which requires passing keyword arguments when creatingLSP models.Here's how to create a server and register a code completion feature:frompygls.capabilitiesimportCOMPLETIONfrompygls.serverimportLanguageServerfrompygls.lspimportCompletionItem,CompletionList,CompletionOptions,CompletionParamsserver=LanguageServer()@server.feature(COMPLETION,CompletionOptions(trigger_characters=[',']))defcompletions(params:CompletionParams):"""Returns completion items."""returnCompletionList(is_incomplete=False,items=[CompletionItem(label='"'),CompletionItem(label='['),CompletionItem(label=']'),CompletionItem(label='{'),CompletionItem(label='}'),])server.start_tcp('127.0.0.1',8080)Show completion list on the client:Docs and TutorialThe full documentation and a tutorial is available athttps://pygls.readthedocs.io/en/latest/.Let Us Know How You Are UsingpyglsSubmit a Pull Request (PR) with your information against theimplementationsdocument.LicenseApache-2.0ContributingYour contributions topyglsare welcome! Please review theContributingandCode of Conductdocuments for how to get started.DonationOpen Law Libraryis a 501(c)(3) tax exempt organization.Help us maintain our open source projects and open the law to all with adonation.
Package: pyGL-SukyLaplante
pyGL is an Python Graphical Librairy forpythonYou can do anything you want with itDOCUMENTATIONImport the libAfter do this method :app = Window("App name", width, height)Do awhileloopAfter use the methodapp.clearScreen()You can set your max FPS by doingapp.setMaxFPS(maxFPS)You can add a background color, you need todoapp.setBackgroundColor(color)At the end you need todo an app.loop()DRAWING/PositionIn this Engine you have Vector2 and Transform; contains twoVector2Object, One is Position and the other is ScaleDrawing a basic line is Simple :app.DrawLine(pos1 : Vector2, pos 2 : Vector2, color, linewidth, outline)Drawing a you have two methods; fast and slowSLOW :app.drawRect(Transform, color)FAST :app.fdr(x,y,w,h,c)MOVING A TRANSFORM/SCALINGyou can use Transfom for Moving and Scaling or just Moving by a presise axisMovingtransform.Translate(movX,movY)//Recommended : do an transform.Update()Scalingtransform.Scale(scaleX,scaleY)//Recommended : do an transform.Update()Fixed Movement / Scalingtransform.x or y = VALUEORtranform.position.x or y = VAULEtransform.w or h = VALUEORtransform.scale.x or y = VALUEConstant usefullObject -> an array stock all of the transform of the objects (width, height, x, y)#Drawing ImagesTo print images you need to get them / loadLoadingImage = app.LoadImage(Path)Print the Imageapp.DisplayImage(Image, x, y)
Package: pygltr
# pygltrPython script to get GitLab Time Reports, it uses the GitLab API## UsageIf you use pygltr from the command line it will get you a CSV file with a list of all issues and some basic information or an overview of the time spent per milestone.```bashusage: pygltr.py [-h] -t TOKEN -p PROJECT [-u URL] [-f FILE | -s]Get time tracking data from GitLaboptional arguments:-h, --help            show this help message and exit-t TOKEN, --token TOKENPrivate GitLab token-p PROJECT, --project PROJECTProject name-u URL, --url URL     URL of the GitLab API-f FILE, --file FILE  CSV output filename-s, --shell           Overview of the time spent per milestone```Beside of the usage as a script pygltr provides the class PyGltr which is ready to use from your own code.### Script example```bashpython pygltr.py -t TOKEN -p PROJECT```Output file (default) issues.csv:| id | issue                              | milestone      | estimate | spent ||----|------------------------------------|----------------|----------|-------|| 5  | Setup a latex template             | Project setup  | 7200     | 3600  || 4  | Define milestones                  | Project setup  | 7200     | 5400  || 3  | Create a physical model            |                | 0        | 0     || 2  | Setup CI                           | Project setup  | 7200     | 3600  || 1  | Functional tests support           |                | 0        | 0     |or```bashpython pygltr.py -t TOKEN -p PROJECT -sMilestone                               Estimate            Spent---------------------------------------------------------------------------------                                       0h 0min             0h 0minPhysical_model                          16h 0min            0h 0minProject_setup                           27h 30min           20h 0min```### Code example```pythonfrom pygltr.pygltr import PyGltrpygltr = PyGltr(url='https://gitlab.com/api/v4/', token='PRIVATE_TOKEN', project_name='PROJECT_NAME')user, project, issues = pygltr()```
Package: pyglucose
pyglucosepybind11-based binding ofglucose SAT solver.Installationpip install git+https://github.com/msakai/glucose-pybind11/Basic UsageThepyglucosemodule exportsSolverandLit.A SAT problem can be solved as follows:Construct a solver instance usingsolver = Solver().Allocate variables usingvar = solver.new_var().
A variable is returned as integer value and can be converted toLitbyLit(var).
A literallitcan be negated as~lit.Add clauses usingsolver.add_clause(clause). A clause is represented asIterable[Lit].Solve the problem usingsolver.solve()Ifsolver.okayproperty isTruethen the problem isSATISFIABLE, and
satisfying assignment can be retrieved usingsolver.modelproperty.
Otherwise, the problem isUNSATISFIABLE.LicenseMIT License
Package: pyGLUE
Generalised Likelihood Uncertainty Estimation (GLUE) FrameworkJoost Delsman, Deltares, 2011Generic Python framework to conduct GLUE analysesNOTE: Package is still under construction and undocumentedNecessary:1) model parameters, that:- hold the statistical properties of the a priori parameter space- hold the statistical properties of the a posteriori parameter space- can return a random value based on the a priori parameter space- can accept an evaluated parameter + behavioural / non-behaviouralstatement from the evaluator2) a model, that:- returns a result set based on a parameter set- can be called successively to explore the parameter space- resides outside GLUE- (can even be outside python)- function or wrapper must return a dict with parameters andtheir values, recognised by the evaluator3) a model evaluator, that:- evaluates the model result by a prescribed set of rules- assigns behavioural / non-behavioural4) a framework that:- initializes a monte-carlo sequence- for each run:- get parameter values- run the model- evaluate the model- store behavioural runs
Package: pyglui
pygluiCython powered OpenGL gui.Similar to AntTweakBar but truly python compatible. No need for ctyped variables.Uses render-to-texture for ulta low cpu use when static.Designed to be used with glfw but should run with other window managers as well.Includespyfontstashfor rendering text.Includescyglto access GL functions (which in turn usesGLEW)cygl and pyfontstash can also be installed separately but are hosted in this project for convenience.Installationpip install pygluiSource installationDependenciesinstallglewLinux (via apt-get)sudoapt-getinstalllibglew-devLinux (via yum)yuminstallglew-develMacOSbrewinstallglewinstall pygluipython-mpipinstallgit+https://github.com/pupil-labs/pygluiSource code# Clone the repository to the local filesystemgitclonehttp://github.com/pupil-labs/pyglui--recursivecdpyglui# Build and install `pyglui` in "editable" modepython-mpipinstall-e.Run the demo# Clone the repository to the local filesystemgitclonehttp://github.com/pupil-labs/pyglui--recursivecdpyglui# Build and install `pyglui` in "editable" mode, with examples dependenciespython-mpipinstall-e".[examples]"# Run the demo examplecdexample
python3example.pyDemo screenshot as of 2017-12-19
Package: pyglyph
glyph - symbolic regression toolsglyphis a python 3 library based on deap providing abstraction
layers for symbolic regression problems.It comes with batteries included:predefined primitive setsn-dimensional expression tree classsymbolic and structure-based constantsinterfacing constant optimization toscipy.optimizeeasy integration withjoblibordask.distributedsymbolic constraintsboilerplate code for logging, checkpointing, break conditions and command line applicationsrich set of algorithmsglyph also includes a plug and play command line applicationglyph-remotewhich lets non-domain experts apply symbolic regression
to their optimization tasks.InstallationGlyph is apython 3.6+only package.You can install the latest stable version from PyPI with pippip install pyglyphor get the bleeding edgepip install git+git://github.com/ambrosys/glyph.git#egg=glyphDocumentationThe online documentation is available atglyph.readthedocs.io.Bugs, feature requests, contributionsPlease use theissue tracker.
For contributions have a look at outcontribution
guide.