Saravanan666/pypi-org huggingface dataset:
Package: graftr
graftrAn interactive shell to view and editPyTorch checkpoints.graftrcan be used to remove, rename, and move around the layers and parameters
of your saved model. It's also a handy tool to peek into the structure of pre-trained PyTorch
models that you canfind online(e.g. Transformer, DCGAN, etc.).The screencast above shows an example of taking a pre-trainedDensenetand preparing it for integration into a larger model. We remove the final classification layer
and move the feature extractor into its owndensenetmodule.Installpip install graftrDocumentationgraftrpresents a hierarchical directory structure forstate_dicts and parameters in your
checkpoint. You can list (ls), move/rename (mv), and print (cat) parameters. And, of course,
you can navigate (cd) through the hierarchy. It also supports standard shell beahvior like
command history, up-arrow, tab-completion, etc.All changes are kept in-memory until you're ready to write them back to your checkpoint withsave.Supported commandscd- change working directory.pwd- print working directory.ls- list directory contents.cat- print the contents of a value or directory.cp- copy value or directory.mv- move/rename value or directory.rm- remove value or directory.parameters- print the number of model parameters under a directory.shape- print tensor shape.device- get or set the device of a tensor or group of tensors.save- write back changes to disk.where- print the location on disk where changes will be saved.exit- exits the shell.FAQShould this be a mountable user-mode filesystem instead?Maybe? Some operations (e.g.shape,parameters,device) don't map easily onto standard filesystem operations. On the other hand, it would be interesting to insert/extract tensors by copying NumPy files in and out of the virtual filesystem.
Package: grafyaml
At a glanceFree software: Apache licenseDocumentation:http://docs.openstack.org/infra/grafyaml/Source:http://git.openstack.org/cgit/openstack-infra/grafyamlBugs:https://storyboard.openstack.org/#!/project/818Overviewgrafyamltakes descriptions ofGrafanadashboards in YAML format, and uses them to produce JSON formatted
output suitable for direct import into Grafana.The tool uses theVoluptuousdata validation library
to ensure the input produces a valid dashboard.  Along with
validation, users receive the benefits of YAML markup such as comments
and clearer type support.For example, here is a minimal dashboard specificationdashboard:time:from:"2018-02-07T08:42:27.000Z"to:"2018-02-07T13:48:32.000Z"templating:-name:hostnametype:querydatasource:graphitequery:node*refresh:truetitle:My great dashboardrows:-title:CPU Usageheight:250pxpanels:-title:CPU Usage for $hostnametype:graphdatasource:graphitetargets:-target:$hostname.Cpu.cpu_prct_usedgrafyamlcan be very useful in continuous-integration
environments.  Users can specify their dashboards via a normal review
process and tests can validate their correctness.The tool can also take JSON manually exported from the Grafana
interface and load it as a dashboard.  This allows keeping dashboards
that have been edited with the inbuilt editor externally version
controlled.A large number of examples are available in the OpenStackproject-configrepository, which are used to create dashboards onhttp://grafana.openstack.org.
Package: grahamscandelaunay
graham-scan-based-incremental-delaunayGraham Scan-Based Incremental Delaunay Triangulation:Sort the input points by x-coordinateSelect the leftmost, bottommost point as the pivot pointSort the other points by angle relative to the pivot point their slopes relative to the pivotConstruct the base convex hull using the pivot point and the first two points sorted by angleIncrementally add the next sorted point and use Graham Scan to get the convex hull, saving any edges that were madeFlip the current triangulation to Delaunay and repeat until doneTODO LIST:Implement Halfedge data structure, with addleaf and addedgeget two sorting algorithms loglinear time, one for x-coord and one for slopeUse a stack to track points on the convex hullUse a queue to track edges that need to be flippedSave all the edges made during the convex hull processCheck the queued edges if they are locally DelaunayFlip non-locally Delaunay edgesWork on visualizationWrite some testsTest sorting for setting up the pointsTest Convex Hull triangulationTest Locally Delaunay checkTest edge flipping on a simple caseDue Date: final code and presentation on April 29thTimeline for progress:4/14/84/154/224/29 project due along with presentationEnvironment and package infoPlease make sure you have installed the pyglet and numpy before running the code, Those two package can be installed using pip commandpip install numpyandpip install pygletThis project has been uploaded to PyPi as a package. You can download the package by the following command:python3 -m pip install grahamscan-delaunayAfter install the package, you can start the project bypython3and then>>> import grahamscan_delaunayVisualizationOnce you start the program, an empty window will pop up. You can add a point by click inside the window, or randomly generate one by pressingG.
Once you finish adding points, pressSto start the Delaunay algorithm step-by-step visualization.
To go to the next step, press the Space Bar.
To reset to the start of the algorithm, pressR. To clear all points, pressC.
The red point indicates the most recently added point.
The blue edge indicates that the edge will be checked if it is Locally Delaunay.
A black point indicates that the point in in the triangulation while a gray point indicates that it has not yet been added to the triangulation.
When the algorithm is complete, the background will turn green. PressRorCto reset the visualization.
Package: grahamscan-delaunay
graham-scan-based-incremental-delaunayGraham Scan-Based Incremental Delaunay Triangulation:Sort the input points by x-coordinateSelect the leftmost, bottommost point as the pivot pointSort the other points by angle relative to the pivot point their slopes relative to the pivotConstruct the base convex hull using the pivot point and the first two points sorted by angleIncrementally add the next sorted point and use Graham Scan to get the convex hull, saving any edges that were madeFlip the current triangulation to Delaunay and repeat until doneTODO LIST:Implement Halfedge data structure, with addleaf and addedgeget two sorting algorithms loglinear time, one for x-coord and one for slopeUse a stack to track points on the convex hullUse a queue to track edges that need to be flippedSave all the edges made during the convex hull processCheck the queued edges if they are locally DelaunayFlip non-locally Delaunay edgesWork on visualizationWrite some testsTest sorting for setting up the pointsTest Convex Hull triangulationTest Locally Delaunay checkTest edge flipping on a simple caseDue Date: final code and presentation on April 29thTimeline for progress:4/14/84/154/224/29 project due along with presentationEnvironment and package infoPlease make sure you have installed the pyglet and numpy before running the code, Those two package can be installed using pip commandpip install numpyandpip install pygletThis project has been uploaded to PyPi as a package. You can download the package by the following command:python3 -m pip install grahamscan-delaunayAfter install the package, you can start the project bypython3and then>>> import grahamscan_delaunayVisualizationOnce you start the program, an empty window will pop up. You can add a point by click inside the window, or randomly generate one by pressingG.
Once you finish adding points, pressSto start the Delaunay algorithm step-by-step visualization.
To go to the next step, press the Space Bar.
To reset to the start of the algorithm, pressR. To clear all points, pressC.
The red point indicates the most recently added point.
The blue edge indicates that the edge will be checked if it is Locally Delaunay.
A black point indicates that the point in in the triangulation while a gray point indicates that it has not yet been added to the triangulation.
When the algorithm is complete, the background will turn green. PressRorCto reset the visualization.
Package: graia-amnesia
AmnesiaA collection of common components for Graia Project.于是明天仍将到来.每一天都会带来新的邂逅, 纵使最终忘却也不会害怕明天到来.简述Amnesia 是一系列共用组件的集合, 包含了以下内容:消息链MessageChain, 沿袭自 Avilla 实现和 Ariadne 部分方法实现;Element基类和Text消息元素实现;Launch API: 程序生命周期管理, 提供准备(prepare), 主线(mainline) 与 清理(cleanup) 三个时间节点; 支持依赖编排;轻量化实现的Service;轻量化的内存缓存实现Memcache, 原版本由 @ProgramRipper 实现, 沿袭自 Avilla;Transport API: 职权分派, 交互主导的网络通信封装;uvicorn: ASGI Runner;starlette: ASGI Application;aiohttp: Http & WebSocket Client.通过 Amnesia, 我们希望能更加轻量化第三方库的依赖, 并籍此促进社区的发展.MessageChain可以让 Avilla, Ariadne, Alconna 等共用统一实现, 并使其泛用性扩大;Launch API可以优化应用的启动流程, 适用于Saya或是单纯的Broadcast Control应用;Service使维护和访问资源的流程更加合理;...或许还会有更多?协议本项目以 MIT 协议开源.
Package: graia-ariadne
AriadneAnother elegant framework for mirai and mirai-api-http v2.接受当下, 面向未来.文档API 参考本项目适用于 mirai-api-http 2.0 以上版本.Ariadne 是Graia Project继承了Application并进行了许多改进后产生的作品,
相信它可以给你带来良好的Python QQ Bot开发体验.注意, 本框架需要mirai-api-http v2.安装pdm add graia-ariadne或poetry add graia-ariadne或pip install graia-ariadne我们强烈建议使用pdm/poetry进行包管理开始使用fromgraia.ariadne.appimportAriadnefromgraia.ariadne.connection.configimportconfigfromgraia.ariadne.modelimportFriendapp=Ariadne(config(verify_key="ServiceVerifyKey",account=123456789))@app.broadcast.receiver("FriendMessage")asyncdeffriend_message_listener(app:Ariadne,friend:Friend):awaitapp.send_message(friend,"Hello, World!")Ariadne.launch_blocking()更多信息请看讨论QQ 交流群:邀请链接QQ 群不定时清除不活跃成员, 请自行重新申请入群.文档如果认为本项目有帮助, 欢迎点一个Star.协议本项目以GNU AGPL-3.0作为开源协议, 这意味着你需要遵守相应的规则.持续集成 (CI) 状态参与开发贡献指南
Package: graia-scheduler
Graia Scheduler一个基于asyncio, 设计简洁, 代码简单的计划任务库, 使用loop.create_task创建计划任务;同时使用生成器特性与croniter的定时设计, 轻盈而强大.Installpipinstallgraia-scheduler# or use pdmpdmaddgraia-scheduler使用0.1以前的版本:importasynciofromgraia.broadcastimportBroadcastfromgraia.schedulerimportGraiaSchedulerfromgraia.scheduler.timersimportcrontabifyloop=asyncio.new_event_loop()bcc=Broadcast(loop=loop)scheduler=GraiaScheduler(loop,bcc)@scheduler.schedule(crontabify("* * * * * *"))defsomething_scheduled():print("print every second.")loop.run_forever()0.1及后续的版本:importasynciofromgraia.broadcastimportBroadcastfromgraia.schedulerimportGraiaSchedulerfromgraia.scheduler.timersimportcrontabifyloop=asyncio.new_event_loop()bcc=Broadcast(loop=loop)scheduler=GraiaScheduler(loop,bcc)@scheduler.schedule(crontabify("* * * * * *"))defsomething_scheduled():print("print every second.")loop.run_until_complete(scheduler.run())因为基于BroadcastControl, 你可以享受使用Dispatcher,Interrupt,Decorator的开发体验.
Package: graiax-cli
Graiax-CLI一个简明易用的 Graia 命令行工具开始使用pipx install graiax-cli(推荐，防止污染全局环境)或者pip install graiax-cli新建项目graiax init交互式初始化一个Graia Framework项目 (Partly WIP)管理插件 (WIP)graiax plugin new新建插件graiax plugin list查看插件列表graiax plugin add添加插件
Package: graiax-mod-unwind
A simple solution to analysis and extract information from tracebackusagefromgraiax.mod.unwindimportReportwithReport()asreport:a=1b=2c='a'd=1+cprint(report.errors)print(report.reports)orfromgraiax.mod.unwindimportget_reporttry:a=1b=2c='a'd=1+cexceptExceptionase:print(get_report(e))
Package: graiax-msgparse
graiax-msgparse这是什么这是一个为匹配graia-application-mirai中MessageChain的设计创造出来的一个为匹配MessageChain做出的argparse
注：从0.0.4开始会尝试匹配graia-ariadne进行适配安装pipinstallgraiax-msgparse# 或使用 poetrypoetryaddgraiax-msgparse如何使用注意：在查看示例代码前，个人建议先查看以下文档graia-document中对Application的介绍Python-document中对argparse模块的介绍fromgraiax.msgparseimportMessageChainParser,ParserExit,Element2Msg,Element2Mirai@bcc.receiver(GroupMessage,dispatchers=[Kanata([RegexMatch('parse.*')])])asyncdefparse_test(app:GraiaMiraiApplication,group:Group,message:MessageChain,member:Member):parser=MessageChainParser(start_string='parse',description='parse测试')parser.add_argument('-r')try:parser.parse_obj(message,space_in_gap=True)exceptParserExitase:awaitapp.sendGroupMessage(group,MessageChain.create([Plain(str(parser.usage)ife.status==0else'参数不足或不正确，请使用 --help 参数查询使用帮助')]))方法几乎跟python自带的ArgumentParser使用方法如出一辙(毕竟是继承于此)
我们就先看看二者不同的区别parser = MessageChainParser(start_string = 'parse')start_string是你的listener的触发条件，MessageChainParser将会检查message开头时候为start_string中的文字并去除parser.parse_obj(message, space_in_gap = True)space_in_gap参数是用于给各个非Plain之间添加缝隙的，因为MessageChainParser的内部处理机制是先将MessageChain转换为字符串，然后再通过shlex.split方法对转换过的字符串进行处理。所以可能会出现一些问题如(At(123),Plain('-s'))当sapce_in_gap为True时，将会自动在俩个element之间添加空格用Element2Msg, Element2Mirai转换非纯Plain消息由于MessageChainParser中将会把除了Plain以外的元素进行特殊处理，所以假设你的参数中带有At,AtAll,Image参数，那么可能会返回这么一串奇怪的东西[json_element:eyJ0eXBlIjoiQXQiLCJ0YXJnZXQiOjEyMywiZGlzcGxheSI6bnVsbH0=]如果需要将这串玩意变成MessageChain或者是Mirai码
你就会需要MsgStringfromgraiax.msgparseimportMessageChainParser,MsgString...parser.add_argument('-r',type=MsgString.decode())#将接收到的信息转换为MessageChain的形式parser.parse_obj(message)
Package: graiax-text2img-playwright
GraiaX TextToImage (Playwright)基于 Playwright 的适用于 Graia 的文转图工具GraiaX TextToImage (Playwright) 是一个基于GraiaX Playwright的文转图工具，
其可以将纯文本、Markdown 文本、HTML 代码通过 Playwright 转换为图片。安装pdm add graiax-text2img-playwright或poetry add graiax-text2img-playwright。我们强烈建议使用包管理器或虚拟环境开始使用以下示例以 Ariadne 为例。配合 Graia Saya 使用fromgraiax.shortcut.sayaimportlistenfromgraiax.text2img.playwrightimportHTMLRenderer,convert_md,PageOption,ScreenshotOptionmd='''\<div align="center"># GraiaX TextToImage (Playwright)*基于 Playwright 的适用于 Graia 的文转图工具*</div>GraiaX TextToImage (Playwright) 是一个基于 [GraiaX Playwright](https://github.com/GraiaCommunity/graiax-playwright) 的文转图工具，其可以将纯文本、Markdown 文本、HTML 代码通过 Playwright 转换为图片。## 安装`pdm add graiax-text2img-playwright` 或 `poetry add graiax-text2img-playwright`。> 我们强烈建议使用包管理器或虚拟环境'''@listen(FriendMessage)asyncdeffunction(app:Ariadne,friend:Friend):image_bytes=awaitHTMLRenderer().render(convert_md(md),extra_page_option=PageOption(viewport={"width":840,"height":10},device_scale_factor=1.5),extra_screenshot_option=ScreenshotOption(type="jpeg",quality=80,scale="device"),)awaitapp.send_message(friend,MessageChain(Image(data_bytes=image_bytes)))预览许可证本项目使用MIT许可证进行许可。
Package: grail
Grail is a library which allows test script creation based on steps.Library usage brings the following benefits to your tests:strict separation test logic from test implementationyou don’t need separate test cases as a documentation for your tests, it will be generated from the codeseparate logging is not required, test execution is automatically loggedtest script creation is easy for people with basic programming skillsstep implementation can be done separatelyMore usage details are available here:http://wgnet.github.io/grail/.
Package: grailkit
Grail KitGrailKit is a library for creative and experimental coding. This library used for development ofGrailapplication.
This library includes handling of Project, CueList's, Cue and reading/writing to *.grail files.
Reading and writing to grail bible format. Implements MIDI, OSC, DMX protocols.Modules and featuresCore:db - Thin sqlite database wrappercore - Signals and basic typesplug - Plugin loading/registrationutil - Utility functions, constants and classesGrail file format:dna - Grail format I/Obible - Grail bible format I/Obible_parse - Parsing other bible formats to grail formatProtocols & communication:osc - Open Sound Control protocol in pure pythonRequirementsPython 3.6+This is a Pure Python so there is no dependencies!
Package: grailmud
grailmud is a MUD server written entirely in Python (though optimising
bottlenecks in C, and a more restricted language for builders and untrusted
coders to work in are options which will be considered in the future) with a
loosely coupled design between the game logic and the display logic for
players, as well as a more loose than is traditional coupling between object
logic and object state. grailmud also leverages Twisted, pyparsing and durus,
so a bare minimum of low-level (networking|parsing|serialisation) code has to
be written.These points make grailmud different from other (aspiring-to-be)
production-ready MUD servers in this area (ie, MUDs written in Python).
PythonMOO, POO, et al, have used a custom scripting language for programming
game logic in, wheras grailmud uses Python for this task. Buyasta, wordplay,
et al, have a tighter coupling between display and game logic. nakedmud
reimplements a -lot- of stuff in C (ick!) which is already done in some
library, or which can be done painlessly in Python. There are many, many
hackish little MUD servers written (I wrote 2 or 3 of them before I got the
design more-or-less Right), but none of these are really suitable to build a
whole game in.One result of the decoupling of display and game logic is that the difference
between player avatars and NPCs becomes the ‘controller’ (the object that
receives the object’s events and acts upon them) for players is linked to a
socket (via the bowels of Twisted) and a few extra instance variables and
methods on the player (eg, the player’s password hash, and the method to take
a line of input and dispatch it to the appropriate command). In more tightly
coupled implementations, players and NPCs are different beasts entirely,
possibly resulting in ridiculous duplication like different ‘take awayXhitpoints’ routines for each type, which should reside in a common base class.Decoupling object logic and object state results in promoting ‘controllers’
(or as they ended up being called in the codebase,delegates, in the Self
tradition) to first-class objects which can be added or removed from objects
at will. So if you want a staff to suddenly start acting like a goblin chief,
it becomes as simple as this:staff.addListener(GoblinChiefLogic())rather than having to delve into theStaffObject’s code and add the goblin
logic in there.
Package: grailts
GRAILA Python implementation ofGRAIL, a generic framework to learn compact time series representations.RequirementsPython 3.6+numpyscipytslearnInstallationInstallation using pip:pip install grailtsTo install from the source:python setup.py installMain ContributorsKarhan Kayan (karhan@uchicago.edu)UsageFull ExampleHere is an example where we load aUCRdataset and run approximate k-nearest neighbors on its GRAIL representations:fromGRAIL.TimeSeriesimportTimeSeriesfromGRAIL.RepresentationimportGRAILfromGRAIL.kNNimportkNNTRAIN,train_labels=TimeSeries.load("ECG200_TRAIN","UCR")TEST,test_labels=TimeSeries.load("ECG200_TEST","UCR")representation=GRAIL(kernel="SINK",d=100,gamma=5)repTRAIN,repTEST=representation.get_rep_train_test(TRAIN,TEST,exact=True)neighbors,_,_=kNN(repTRAIN,repTEST,method="ED",k=5,representation=None,pq_method='opq')print(neighbors)Loading DatasetsTo load UCR type datasets:TRAIN,train_labels=TimeSeries.load("ECG200_TRAIN","UCR")TEST,test_labels=TimeSeries.load("ECG200_TEST","UCR")In this package, we assume that each row of the datasets is a time series.Fetch GRAIL RepresentationsTo fetch exact GRAIL representations of a training and a test dataset:representation=GRAIL(kernel="SINK",d=100,gamma=5)repTRAIN,repTEST=representation.get_rep_train_test(TRAIN,TEST,exact=True)Heredspecifies the number of landmark series, andgammaspecifies the hyperparameter used for the SINK kernel. Ifgammais not specified, it will be tuned by the algorithm.If a single dataset is used instead:repX = representation.get_representation(X)Get Approximate k-Nearest-NeighborsTo get the approximate k-Nearest-Neighbors ofTESTinTRAINuse:neighbors,correlations,return_time=kNN(repTRAIN,repTEST,method="ED",k=5,representation=None,pq_method='opq')Note that Euclidean Distance in the GRAIL representation space estimates the SINK correlation in the original space.
Package: grainlearning
Welcome to GrainLearning!fair-software.eu recommendations(1/5) code repository(2/5) license(3/5) community registry(4/5) citation(5/5) checklisthowfairisOther best practicesDocumentationBayesian uncertainty quantification for discrete and continuum numerical models of granular materials,
developed by various projects of the University of Twente (NL), the Netherlands eScience Center (NL), University of Newcastle (AU), and Hiroshima University (JP).
Browse to theGrainLearning documentationto get started.FeaturesInfer and update model parameters using "time" series (sequence) data viaSequential Monte Carlo filteringUniform, quasi-random sampling usinglow-discrepancy sequencesIterative sampling by training a nonparametricGaussian mixture modelSurrogate modeling capability for "time" series dataInstallationInstall using poetry (recommended)Install poetry followingthese instructions.Clone the repository:git clone https://github.com/GrainLearning/grainLearning.gitGo to the source code directory:cd grainLearningActivate the virtual environment:poetry shellInstall GrainLearning and its dependencies:poetry installRun all self-tests of GrainLearning with pytest:poetry run pytest -vFor windows users, clickhereto check other installation options.TutorialsLinear regression with therun_simcallback function of theModelclassNonlinear, multivariate regressionInteract with the numerical model of your choiceLoad existing simulation data and run GrainLearning for one iterationCiting GrainLearningPlease choose from the following:A DOI for citing the softwareH. Cheng, T. Shuku, K. Thoeni, P. Tempone, S. Luding, V. Magnanimo.An iterative Bayesian filtering framework for fast and automated calibration of DEM models.Comput. Methods Appl. Mech. Eng.,350 (2019), pp. 268-294,10.1016/j.cma.2019.01.027Software using GrainLearningYADE:http://yade-dem.org/MercuryDPM:https://www.mercurydpm.org/CommunityThe original development ofGrainLearningis done byHongyang Cheng, in collaboration withKlaus Thoeni,Philipp Hartmann, andTakayuki Shuku.
The software is currently maintained with the help ofLuisa Orozco,Retief Lubbe, andAron Jansen.
The GrainLearning project receives contributions from students and collaborators. For an exhaustive list, seeCONTRIBUTORS.md.Help and SupportFor assistance with the GrainLearning software, please raise an issue on the GitHub Issues page.CreditsThis package was created withCookiecutterand theNLeSC/python-template.