Giter VIP home page Giter VIP logo

lcgit's People

Contributors

arcsector avatar dav3r avatar dependabot[bot] avatar felddy avatar hillaryj avatar jasonodoom avatar jmorrowomni avatar jsf9k avatar mcdonnnj avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

conspiracy98

lcgit's Issues

Add support for Python 3.11

Python 3.11 has incompatible changes in the random library which causes lcgit to fail with the following message:
TypeError: Random.shuffle() got an unexpected keyword argument 'random'

See:

Blocks #18


@felddy - The code as it stands is failing for Python >= 3.11, because the signature of random.shuffle has changed. The problem is here:

lcgit/src/lcgit/lcgit.py

Lines 117 to 123 in 3f2fd33

else:
# use shuffle
shuffled_seq = list(self.seq)
shuffle(
shuffled_seq,
random=lambda: abs(sin(self.multiplier + self.increment + seed)),
)

I know it's been a while since you wrote this, but do you have any bright ideas for how to fix it? One solution would be to modify our code to reproduce whatever the pre-3.11 code was doing, although I think it's worth noting that the else clause only applies for self.seqlength <= 4 which is a case of limited usefulness anyway.

Originally posted by @jsf9k in #18 (comment)

Error in the Readme in Example 1

๐Ÿ› Summary

What's wrong?
The first example in the Readme should be

from lcgit import lcg
from ipaddress import ip_network

for i in lcg(ip_network("10.0.0.0/8")):
  print(i)

not

from lcgit import lcg
from ip_address import ip_network

for i in lcg(ip_network("10.0.0.0/8")):
  print(i)

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.