Last active
December 27, 2024 05:12
-
-
Save rjurney/4f8041f09884d841815bd025f6f5c317 to your computer and use it in GitHub Desktop.
Github Copilot can do network motifs...
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
We can also look for a more complex motif: a directed square. We will find all instances of a directed square in the graph. | |
<div data-lang="python" markdown="1"> | |
{% highlight python %} | |
# G8: Directed Square | |
paths = g.find("(a)-[e]->(b); (b)-[e2]->(c); (c)-[e3]->(d); (d)-[e4]->(a)") | |
four_edge_count(paths).show() | |
{% endhighlight %} | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment