Git Product home page Git Product logo

snappyer's Introduction

Snappyer

Snappyer is a thin Python library (well, actually, it's a file) on top of snap.py, version 0.8.1 or higher.

I wrote this while doing PA1 in 224W because I was tired of SNAP.py's non-Pythonic approach to life.

What on Earth?

Stop using snap.py directly. Start being happier. Snappyer exposes three classes: SnapGraph, SnapNode, and SnapEdge. They wrap up all the major functions of snap.py into classes that acutally make sense, take away all playing with pointers, and use standard Python collections wherever possible.

How do I program with this?

  • Install snap.py 0.8.1 or higher.
  • Put snappyer.py into your main directory.
  • import * from snappyer

See snappyer_test.py for everything I've implemented. Basically, use SnapGraphs, which will give you SnapNodes and SnapEdges.

You're missing a function / something is broken

Sorry, I didn't think it was important, or I haven't seen the bug. Fix it, and pull request this repo.

If you just want to get around it, you can get raw snap.py objects and put them into SNAP yourself: SnapGraph.rawGraph, SnapNode.rawNode, SnapEdge.rawEdge.

Is this efficient?

Yep. It's a thin wrapper on top of snap.py that mostly just rewrites function names. All of PA1 took this lib about 10-12 minutes to finish, which is as fast as I've heard anyone getting.

Added bonus

My IDE now auto-completes, since it can see snappyer objects.

Author / License

Stephen Trusheim, CC-BY-SA 3.0.

snappyer's People

Contributors

trusheim avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.