Saravanan666/pypi-org huggingface dataset:
Package: grafanalib
Do you likeGrafanabut wish you could version your
dashboard configuration? Do you find yourself repeating common patterns? If
so, grafanalib is for you.grafanalib lets you generate Grafana dashboards from simple Python scripts.How it worksTake a look atthe examples directory,
e.g.this dashboardwill configure a dashboard with a single row, with one QPS graph broken down
by status code and another latency graph showing median and 99th percentile
latency.In the code is a fair bit of repetition here, but once you figure out what
works for your needs, you can factor that out.
Seeour Weave-specific customizationsfor inspiration.You can read the entire grafanlib documentation onreadthedocs.io.Getting startedgrafanalib is just a Python package, so:$pipinstallgrafanalibGenerate the JSON dashboard like so:$curl-oexample.dashboard.pyhttps://raw.githubusercontent.com/weaveworks/grafanalib/main/grafanalib/tests/examples/example.dashboard.py$generate-dashboard-ofrontend.jsonexample.dashboard.pySupportThis library is in its very early stages. We’ll probably make changes that
break backwards compatibility, although we’ll try hard not to.grafanalib works with Python 3.6 through 3.11.DevelopingIf you’re working on the project, and need to build from source, it’s done as follows:$virtualenv.env$../.env/bin/activate$pipinstall-e.Configuring Grafana DatasourcesThis repo used to contain a programgfdatasourcefor configuring
Grafana data sources, but it has been retired since Grafana now has a
built-in way to do it.  Seehttps://grafana.com/docs/administration/provisioning/#datasourcesCommunityWe currently don’t follow a roadmap forgrafanaliband bothmaintainers
<https://github.com/weaveworks/grafanalib/blob/main/MAINTAINERS>have recently
become somewhat occupied otherwise.We’d like you to join thegrafanalibcommunity! If you would like to
help out maintaininggrafanalibthat would be great. It’s a fairly laid-back
and straight-forward project. Please talk to us on Slack (see the links below).We follow theCNCF Code of Conduct.Getting HelpIf you have any questions about, feedback for or problems withgrafanalib:Read the documentation athttps://grafanalib.readthedocs.ioInvite yourself to theWeave Users Slack.Ask a question on the#grafanalibslack channel.File an issue.Your feedback is always welcome!
Package: grafana-pandas-datasource
Grafana pandas datasourceAboutA HTTP API based onFlaskfor servingpandasdata frames toGrafana,
generated byNumPy. TheGrafana Simple JSON Datasourceis used to interface
Grafana with the HTTP API.This way, a pure Python application can be used to directly supply data to
Grafana, both easily and powerfully.The framework supports feeding both timeseries data as well as annotations
through corresponding/queryand/annotationsendpoints and also
provides/searchand/panelsendpoints.ScreenshotsImage: Sinewave data and midnights annotations, both generated usingNumPy,
seeSinewave/Midnights example.SetupGrafana pandas datasource setupoutlines how to install all software
prerequisites needed to run this project. Please read this section carefully.pip install grafana-pandas-datasourceSynopsisTest drive:# Run Grafana pandas datasource demo.
python examples/sinewave-midnights/demo.py

# Submit a timeseries data request.
echo '{"targets": [{"target": "sine_wave:24"}], "range": {"from": "2022-02-22T15", "to": "2022-02-22T20"}}' | http http://127.0.0.1:3003/query

# Submit an annotation data request.
echo '{"annotation": {"query": "midnights:xx"}, "range": {"from": "2022-02-20", "to": "2022-02-22"}}' | http http://127.0.0.1:3003/annotationsWhen the environment has been properly configured, both requests above will
yield appropriate responses.Then, configure the Grafana entities. You will need a datasource object and a
dashboard object.ExamplesThere aredifferent demo programsaccompanied with Grafana datasource and
dashboard definition files.After confirming the sandbox environment has been installed successfully,
please head over to theSinewave/Midnights examplepage in order to learn
how to provision Grafana with corresponding resources.Custom implementationsIn order to conceive your ownpandas-based data source, please use theSinewave/Midnights demo.pyas a blueprint. If you think it would be a
valuable contribution to the community, we will be happy to add it to the
repository.CreditsKudos to Linar, who conceived the initial version of this software the other
day athttps://gist.github.com/linar-jether/95ff412f9d19fdf5e51293eb0c09b850.Other projectsOz Tiram conceived a similar piece of software with Python. He uses the Bottle
web framework.https://gitlab.com/oz123/grafana-python-datasourcehttps://oz123.github.io/writings/2019-06-16-Visualize-almost-anything-with-Grafana-and-Python/index.html
Package: grafanarmadillo
SummaryGrafanarmadillo simplifies interacting with Grafana, with a focus on templating dashboards.LibraryGrafanarmadillo is a library that navigates the Grafana API. It has helpers to find dashboards and alerts; make and fill templates; and provision those filled templates. Seehttps://github.com/lilatomic/grafanarmadillo/tree/main/docs/rst/usage.rstfor samples.ToolsGrafanarmadillo is a tool that helps turn dashboards and alerts into templates and to turn templates into dashboards and alerts. Seehttps://github.com/lilatomic/grafanarmadillo/tree/main/docs/rst/cli.rstAcknowledgmentsThis repository was built from theskeletondeveloped by Joao M. C. Teixeira (webpage,github)Versionv0.5.0Changelogv0.5.0 (2024-02-25)feature : bulk migrator supports templatingv0.4.0 (2024-02-13)feature : migrator to upgrade alerts from Legacy to Unifiedfeature : bulk migrator to move all alerts and dashboardsv0.3.0 (2023-12-26)feature : Finder.create_or_get_alert will create a placeholder alert instead of faking onefeature : helpful Flow for performing multiple templating operationsfeature : can set provenance of provisioned alerts (defaults to disabled)deprecated : Windows and MacOS platforms are no longer supportedv0.2.1 (2023-10-31)feature : option to automatically generate template replacers in clifeature : expose cli functions as library functionsv0.2.0 (2023-10-30)feature : find, template, import, and export alertsfeature : helpful CLI to do the most common taskfeature : add Python 3.12 supportdeprecated : drop Python 3.7 supportv0.1.0 (2023-08-09)feature : add Python 3.11 supportfeature : add Grafana 9 and 10 supporttask : switch backend to panodata/grafana-clientv0.0.9 (2022-07-26)feature : add Python 3.9 and Python 3.10 supportv0.0.8 (2021-09-26)feature : add Finder.create_or_get_dashboard to help importing dashboardsfeature : add helper DashboardTransformer to combine several DashboardTransformersfeature : add helper DashboardTransformer to process all panels in a dashboardv0.0.7 (2021-09-24)feature : Templator, which makes templates from dashboards (and vice-versa) by applying arbitrary transformsincludes a helper to easily convert a dictionary into a list of terms to globally find/replacev0.0.6 (2021-09-21)feature : Dashboardercan get or set the content of a dashboardcan export and import dashboards (like with the “json model” and “import” buttons in Grafana)patch : get_dashboard returns exactly 1 (not a list)patch : get_folder returns exactly 1 (not list)patch : fix returns of methods in Finderv0.0.5 (2021-09-20)fix buildv0.0.4 (2021-09-20)docsdocsdocsv0.0.3 (2021-09-20)adds methods for finding Grafana dashboards and folders by namev0.0.2 (2021-09-18)fixes CICD pipelinesv0.0.1 (2021-09-16)templates fromhttps://github.com/joaomcteixeira/python-project-skeleton
Package: grafana-snapshot
grafana-snapshot PackageInstallIf you want to use the API algorithms in your code, it is as simple as:$ pip install grafana-snapshotYou can test by creating a python file:fromGrafanaSnapshot.snapshot_faceimportSnapshotFaceif__name__=="__main__":grafana=SnapshotFace(auth='xxxxx',host='localhost',port='3000',protocol='https')## Create snaphotresults=grafana.snapshots.create_snapshot(tags="test_tag",time_from=1563183710618,time_to=1563185212275)## Delete snaphot by keyresult=grafana.snapshots.delete(delete_key='some_delete_key',key=None)## get snaphot by keyresults=grafana.snapshots.get_snapshot_by_key(key='some_key')UninstallIf you want to uninstall grafana-snapshot, it is as simple as:$ pip uninstall -y grafana-snapshotStatusAPIStatusCreate Snapshot+Delete Snapshot+Get Snapshot by tags+
Package: grafannotate
grafannotateA CLI tool to send Grafana annotations to various destinations.Installationpip install grafannotateUsagegrafannotate --help
Usage: grafannotate [OPTIONS]

  Send Grafana annotations to various endpoints

Options:
  -u, --uri TEXT          URI to send annotation to. Default:
                          "http://localhost:3000/api/annotations".
  -k, --api-key TEXT      Grafana API key to pass in Authorisation header
  -T, --title TEXT        Event title. Default: "event".
  -t, --tag TEXT          Event tags (can be used multiple times).
  -d, --description TEXT  Event description body. Optional.
  -s, --start INTEGER     Start timestamp (unix secs). Default: current
                          timestamp.
  -e, --end INTEGER       End timestamp (unix secs). Optional.
  --help                  Show this message and exit.ExamplesSend an annotation to Grafana API for current timegrafannotate --uri http://user:password@grafana:3000/api/annotations --tag my_tag --title "Event Title"Send an annotation to Grafana API for a time regiongrafannotate --uri http://user:password@grafana:3000/api/annotations --tag my_tag --title "Event Title" --start 1557222057 --end 1557222259Send an annotation to Grafana API with an extended descriptiongrafannotate --uri http://user:password@grafana:3000/api/annotations --tag my_tag --title "Event Title" --description "Some longer description<br />with newlines<br />and <a href=\"https://something.com/\">links</a>"Pipe output to an annotation descriptionSTART_TIME=`date +%s`
command_with_output | grafannotate --uri http://user:password@grafana:3000/api/annotations --tag my_tag --title "Event Title" --start $START_TIMESend an annotation to Grafana API using Authorization headerGRAFANA_API_TOKEN="some_generated_api_token"
grafannotate --uri http://grafana:3000/api/annotations --tag my_tag --title "Event Title" --api-key $GRAFANA_API_TOKEN
Package: grafatko
Grafátko [gɾafɑtko]An app for creating and visualizing graphs and graph-related algorithms.Running GrafátkoFirst, install the app by runningpip install grafatko.
Then you can simply run thegrafatkocommand from a terminal of your choice.Another way to run Grafátko (albeit a little more difficult) is to first clone the repository, go to the base directory and run the project as a Python module:xiaoxiae@thinkpad ~> git clone https://github.com/xiaoxiae/Grafatko.gitxiaoxiae@thinkpad ~> cd Grafatko/xiaoxiae@thinkpad ~> pip install -r requirements.txtxiaoxiae@thinkpad ~> python -m grafatko.__init__ControlsMouseright buttoncreates new nodes/vertices+ shiftdoesn't deselect the currently selected nodes:left buttonselects and drags nodes/vertices around the screenif held, drags nodes along with the mouse+ shifttoggles selection on nodes/verticesif held, moves the entire graph componentmiddle buttonpansmouse wheelzooms+ shiftrotates nodes about the currently selected onesKeyboardrtoggles 'tree mode' for smoother visualisation of treesessentially applies special forces on the nodes to group them by distance from the currently selected nodeonly works if a single node is selectedspacecenters on the currently selected nodesdeletedeletes the currently selected itemsOthercomplement-- makes the graphcomplementedreorinet-- changes the directions of the vertices of the graphVisualizing algorithmsThe app allows for visualising custom algorithms on the currently edited graph.
Examples of valid programs can be found in theexamples/folder.After creating a graph, you can go toAlgorithms -> Runand select the one you want to run on the graph.
The program then calls a function with the same name as the file, the only parameter being theDrawableGraphobject to run the algorithm on.When the animation is running, you can use thepause,resumeandclearto control it.Importing/exporting graphsThe app uses a simple text-based format for importing and exporting graph.
Each line of the file the formatn1 [direction] n2 [weight], where:n1andn2are labels of the nodes forming the vertex, containing no whitespace characters[direction]is used in directed graphs and is either->or<-[weight]is used in weighted graphs, denotes the weight of the vertex (either int or float)Examples of valid graphs can be found in theexamples/folder.
Package: grafeas
Grafeas: An implementation of the Grafeas API, which stores, and enables querying and retrieval of critical metadata about all of your software artifacts.Client Library DocumentationProduct DocumentationQuick StartIn order to use this library, you first need to go through the following steps:Select or create a Cloud Platform project.Enable billing for your project.Enable the Grafeas.Setup Authentication.InstallationInstall this library in a virtual environment usingvenv.venvis a tool that
creates isolated Python environments. These isolated environments can have separate
versions of Python packages, which allows you to isolate one project’s dependencies
from the dependencies of other projects.Withvenv, it’s possible to install this library without needing system
install permissions, and without clashing with the installed system
dependencies.Code samples and snippetsCode samples and snippets live in thesamples/folder.Supported Python VersionsOur client libraries are compatible with all currentactiveandmaintenanceversions of
Python.Python >= 3.7Unsupported Python VersionsPython <= 3.6If you are using anend-of-lifeversion of Python, we recommend that you update as soon as possible to an actively supported version.Mac/Linuxpython3 -m venv <your-env>
source <your-env>/bin/activate
pip install grafeasWindowspy -m venv <your-env>
.\<your-env>\Scripts\activate
pip install grafeasNext StepsRead theClient Library Documentationfor Grafeas
to see other available methods on the client.Read theGrafeas Product documentationto learn
more about the product and see How-to Guides.View thisREADMEto see the full list of Cloud
APIs that we cover.
Package: graffle2pdftex
A command line tool that exports OmniGraffle figures to PDF_TexInstallationIn order to have it successfully installed and working, following is required:[OmniGraffle](http://www.omnigroup.com/mailman/archive/omnigraffle-users/2008/004785.html) 7.21python >= 3.9[appscript](http://appscript.sourceforge.net/py-appscript/index.html) >= 0.22PyMuPDFYou can either clone the repository and install usingpip install .Or install straight from the PIP repository:pip install graffle2pdftexUsageUsage: graffle2pdftex [options] <source>Options:-h,--helpshow this help message and exit--debugprint out debug messagesExports the figure/canvases to a new folder of the same name as the input file in the source file’s parent directoryExamplesExportallcanvases into PDF_Tex files` $ graffle2pdftex figure.graffle `Making a releaseupdate the version number insetup.pycommitpushregister release$ python setup.py registerupload release$ python setup.py bdist uploadDeveloping graffle2pdftexclonestage$ python setup.py developmake a new feature branchcodedo releaseunstage$python setup.py develop –uninstall
Package: graffunc
# Graffunc -- The graph of function data structurePython package allowing manipulation of data by graph pathfinding.## usage example(see more in [tests](graffunc/test/) and [examples](examples/))from graffunc import graffunc, InconvertibleErrordef my_a_to_b_converter(a):b = a.upper()return {'b': b}def my_b_to_c_converter(b):c = 'payload: ' + b + '/payload'return {'c': c}def my_a_to_c_converter(a):raise InconvertibleError()# creation of the main objectgrfc = graffunc({('a',): {('b',): my_a_to_b_converter},})# dynamic modification of the objectgrfc.add(my_b_to_c_converter, sources={'b'}, targets={'c'})grfc.add(my_a_to_c_converter, sources={'a'}, targets={'c'})assert {'a', 'b', 'c'} == grfc.reachables_types(sources={'a'})assert {'b', 'c'} == grfc.reachables_types(sources={'b'})assert {'c'} == grfc.reachables_types(sources={'c'})assert {'b': 'HELLO'} == grfc.convert(sources={'a': 'hello'}, targets={'b'})assert {'c': 'payload: HELLO/payload'} == grfc.convert(sources={'a': 'hello'}, targets={'c'})## installationpip install graffunc## links[github](http://github.com/aluriak/graffunc) and [pypi](http://pypi.python.org/pypi/graffunc)
Package: grafico-fit
Generazione grafici da dati in un foglio ExcelIl package contiene due funzioni:fit()tabella()Entrambe permettono di leggere dati da un file excel in cui i titoli di colonna riportano l'unità di misura tra parentesi quadrefitLa funzione fit crea:un file pdf contenente il grafico di fit e il grafico dei residuiun file LaTeX contenete la tabella dei parametri ottimali della funzione usata per il fit
I dati sono presi da colonne di un foglio Excel.tabellaLa funzione crea un file .tex contenente una tabella i cui valori vengono estratti da un foglio ExcelRequirementper compilare il file LaTeX contenete una tabella generata databella()è necessario importare i package:\usepackage{booktabs}\usepackage{longtable}
Package: grafog
grafogGraph Data Augmentation Library for PyTorch Geometric.What is it?Data augmentations are heavily used in Computer Vision and Natural Language Processing to address data imbalance, data scarcity, and prevent models from overfitting. They have also proven to yield good results in both supervised and self-supervised (contrastive) settings.grafog(portmanteau of "graph" and "augmentation") provides a set of methods to perform data augmentation on graph-structured data, especially meant for self-supervised node classification. It is built on top oftorch_geometricand is easily integrable with itsDataAPI.InstallationYou can install the library viapip:$ pip install grafogYou can also install the library from source:$ git clone https://github.com/rish-16/grafog
$ cd grafog
$ pip install -e .Dependenciestorch==1.10.2
torch_geometric==2.0.3UsageThe library comes with the following data augmentations:Random Node DropRandom Edge DropNormalize FeaturesMixUp StrategyNode Feature MaskingEdge Feature MaskingThere are many more features to be added over time, so stay tuned!fromtorch_geometric.datasetsimportCoraFullimportgrafog.transformsasTnode_aug=T.Compose([T.NodeDrop(p=0.45),T.NodeMixUp(lamb=0.5,classes=7),...])edge_aug=T.Compose([T.EdgeDrop(0=0.15),T.EdgeFeatureMasking()])data=CoraFull()model=...forepochinrange(10):# begin training loopnew_data=node_aug(data)# apply the node augmentation(s)new_data=edge_aug(new_data)# apply the edge augmentation(s)x,y=new_data.x,new_data.y...RemarksThis library was built as a project for a class (UIT2201) at NUS. I planned and built it over the span of 10 weeks. I thankProf. Mikhail Filippovfor his guidance, feedback, and support!If you spot any issues, feel free to raise a PR or Issue. All meaningful contributions welcome!LicenseMIT
Package: graft-cli
graft-cliA command line utitily to provide services offered by graftpress (a graft-elm web
framework).UsageTo create a new graft projectgraft-cli init <project_name>eg:graft-cli init helloTo build projectMove to the project directory and rungraft-cli buildIn our example:$ cd hello $ graft-cli buildTo get server up and running$ graft-cli debugDevelopmentUse local package:$ pip install -e .use blackblack graft-clifrom time to time.run test:graft-cli test.
Package: grafton
GraftonGrafton is a GDPR anonymizer for any file using informed consent, encoding key and randomising numbersIt can anonymize various input files such as CSV, json, XML or other flat files. In line with the GDPR legislation, the mandatory fields have been anonymized, so that any detection of the subjects is prevented.The encryption key for this anonymization process is provided in a separate file (CSV) and must be stored securely afterwards. In accordance with the GDPR, data is only retained when informed consent is given. Consent can be provided in a separate CSV file. The tracked numbers can also be randomized within a similar order of magnitude.The use of this package does not guarantee compliance with the GDPR. This package only performs the steps described above.This package is developed by the AI team atVIVES University of Applied Sciencesand is used in our research ondemand forecasting.Grafton works with any extension, but is initially designed to anonymise the file flatfile.csv:with a list of replacement values in the key file: pseudonyms.csvretaining only users with consent in a list in the consent file: consent.csvThe anonymised file export.csv (any extension possible again) is then saved to the current directory.The script has default names for all the lists and files to anonymise, but these can be altered if needed.Getting startedInstallationInstall python3.7+Create a virtual env where you want to install:$> python3 -m venv graftonActivate the environment$> source grafton/bin/activateInstall the package with pip$> pip install graftonRandomize numeric entriesfromgraftonimportrandomise_numberint_number=5randomized_number=randomise_number(int_number)Anonymize files of any formatfromgraftonimportanonymiseimportpandasaspd# The pseudoynyms filepseudonyms_url='https://raw.githubusercontent.com/yForecasting/grafton/main/grafton/pseudonyms.csv'pseudonyms_file=pd.read_csv(pseudonyms_url,sep=';')# The consent file with the entries they gave their consentconsent_url='https://raw.githubusercontent.com/yForecasting/grafton/main/grafton/consent.csv'consent_file=pd.read_csv(consent_url)# The location of the flatfile to be anonymizedflat_file='https://raw.githubusercontent.com/yForecasting/grafton/main/grafton/flatfile.csv'# The location of the export fileexport_file='/content/export.csv'anonymise(pseudonyms_file=pseudonyms_url,consent_file=consent_url,flat_file=flat_file,export_file=export_file)Original data read.
Export started.
Wait for the end of script signature!
Grafton complete.
---- end of script ----ContributingContribution is welcomed!Start by reviewing thecontribution guidelines. After that, take a look at agood first issue.Disclaimergraftondoes not save, publish or share with anyone any identifiable user information.The use of this package does not guarantee compliance with the GDPR. This package only performs the steps described above.SupportTheAI teamat VIVES University of Applied Sciences builds and maintains grafton to make it simple and accessible. We are using this software in our research ondemand forecasting. A special thanks to Ruben Vanhecke and Filotas Theodosiou for their contribution.
Package: graftpress-cli
graftpress-cliA command line utitily to provide services offered by graftpress (a graftpress web
framework).UsageTo create a new graft projectgraftpress-cli init <project_name>eg:graftpress-cli init helloTo build projectMove to the project directory and rungraftpress-cli buildIn our example:$ cd hello $ graftpress-cli buildTo get server up and running$ graftpress-cli debugDevelopmentUse local package:$ pip install -e .use blackblack graftpress-clifrom time to time.run test:graftpress-cli test.