Coder Social home page Coder Social logo

gensynet's Issues

Crash occurs for large values of host count

Reported by @cglewis
This function seemed to crash sometimes when divvying up hosts among a variable number of subnets.

>>> gensynet.randomize_subnet_breakdown(1000, 104, 150)
DEBUG: subnet count: 150    nodes left: 850
DEBUG: subnet count: 114    nodes left: 736
DEBUG: subnet count: 125    nodes left: 611
DEBUG: subnet count: 116    nodes left: 495
DEBUG: subnet count: 144    nodes left: 351
DEBUG: subnet count: 141    nodes left: 210
DEBUG: subnet count: 125    nodes left: 85
DEBUG: looping with s=1, count=114, left=85
DEBUG: looping with s=0, count=150, left=84
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/achang/Projects/gensynet/gensynet.py", line 324, in randomize_subnet_breakdown
    subnets.remove(s)
ValueError: list.remove(x): x not in list

"VOIP" and "UNKNOWN" are inverted when customizing node distributions

Just ran into this today when generating a data set. When it first generates totals and then prompts you to reset the distribution you see:
...
VOIP phone : 0
Unknown : 160
Manually reset the above Device Role Distribution? [No]: yes

...but then it presents "Unknown" before "VOIP" which through me off:
Unknown (MAX=191) [160]:
VOIP phone (MAX=31) [0]: 31

Can we make these uniform?

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.