# Grasp
Graph with ASP made easy.
## Use cases
### Write an ASP graph into gexf
grasp convert data.lp target.gexf
### Extract the biggest cc, write it anonymized in gml
grasp split data.lp --biggest-first "data_cc.lp" --slice 0 1
grasp convert data_cc_1.lp target.gml --anonymized
### Generate a small world graph in gml
grasp generate data.gml erdos_renyi_graph n=100 p=0.01
## Packaging
pip install graph-asp
Will also populate your env with the executable `grasp`,
enabling access to the CLI.
Note that the package *grasp* exists, but is unrelated to this work.
## CLI commands
CLI provides access to higher level [routines](grasp/routines.py).
- `split`: split by connected component.
- `info`: give info about given graph.
- `convert`: rewrite, anonymize or convert the graph to (clean) ASP or standard format.
- `generate`: generate a graph using a given generation method.
<!-- - `compress`: produce the powergraph compression of given graph as a bubble file -->
<!-- - ``: -->
### Other examples
# split a graph by cc
python -m grasp split data.lp -o "data_{}.lp"
# get infos
python -m grasp infos data.lp --graph-properties
# there is a shitload of options
python -m grasp infos --help
# conversions between formats
python -m grasp convert data.lp data.gml --anonymize
# generation of new graphs to play with
python -m grasp generate graph.gml powerlaw_cluster_graph n=5 m=2 p=0.01
Graph with ASP made easy.
## Use cases
### Write an ASP graph into gexf
grasp convert data.lp target.gexf
### Extract the biggest cc, write it anonymized in gml
grasp split data.lp --biggest-first "data_cc.lp" --slice 0 1
grasp convert data_cc_1.lp target.gml --anonymized
### Generate a small world graph in gml
grasp generate data.gml erdos_renyi_graph n=100 p=0.01
## Packaging
pip install graph-asp
Will also populate your env with the executable `grasp`,
enabling access to the CLI.
Note that the package *grasp* exists, but is unrelated to this work.
## CLI commands
CLI provides access to higher level [routines](grasp/routines.py).
- `split`: split by connected component.
- `info`: give info about given graph.
- `convert`: rewrite, anonymize or convert the graph to (clean) ASP or standard format.
- `generate`: generate a graph using a given generation method.
<!-- - `compress`: produce the powergraph compression of given graph as a bubble file -->
<!-- - ``: -->
### Other examples
# split a graph by cc
python -m grasp split data.lp -o "data_{}.lp"
# get infos
python -m grasp infos data.lp --graph-properties
# there is a shitload of options
python -m grasp infos --help
# conversions between formats
python -m grasp convert data.lp data.gml --anonymize
# generation of new graphs to play with
python -m grasp generate graph.gml powerlaw_cluster_graph n=5 m=2 p=0.01
Metadata
Release files for graph-asp 0.0.9
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| graph-asp-0.0.9.tar.gz | 9.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| graph_asp-0.0.9-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 21.1 kB
Release files / graph-asp-0.0.9.tar.gz
| Download URL | graph-asp-0.0.9.tar.gz |
|---|---|
| Size | 9.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ff025d2b3253146c2a2199f63f5b690dce1fed60b3f8f5b01abd513f7a2d70e9
|
|
BLAKE2b-256 checksum How to use checksums |
1c9189bdcb26d4f7746de65385e260c1073eb5079daca8847a56e738869e9191
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / graph_asp-0.0.9-py3-none-any.whl
| Download URL | graph_asp-0.0.9-py3-none-any.whl |
|---|---|
| Size | 12.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3f4d8818044e29081719003b52316f98fea4af8088f67fed4b7473b777a7f51a
|
|
BLAKE2b-256 checksum How to use checksums |
ae14c568e326058c2bfef2ce4fb9b9193408c7d7a8d4a518079c81de6f77b228
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |