Code Monkey home page Code Monkey logo

random-word's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

random-word's Issues

I don't think this is thread-safe

I'm trying to use this with the parallel gem inside a thread and I get this error:

"fiber called across threads"

I'm doing something like this:

results = Parallel.map([1,2,3,4,5,6,7],:in_threads=>2) do |item|
  RandomWord.nouns.next
end

How to recover from a StopIteration

I am getting this error. It appears to be coming from RandomWord.nouns.next. I assume it means I reached the end of the list. what is the recommended way of recovering from it?

   StopIteration:
     iteration reached an end

I don't mind starting the list from the beginning again. It's just not clear how to do that.

mode to exclude offensive words?

Hi there! ๐Ÿ‘‹

I wanted to write a quick issue to let you know about a situation we experienced a couple weeks ago!

We used random-word to generate passwords for a few dozen new user accounts for our web app. For security, we didn't have any visibility into the passwords being generated before sending them via email to the account holders. A couple days later, one of our users emailed us about a password they received that had an extremely upsetting word in it. It was the n-word. ๐Ÿ˜–

Ultimately, this isn't a problem with the gem at all - I know there's an exclusion list, probably exactly for this reason! However, we definitely didn't think about that ahead of time, and I imagine other folks may be in the same boat.

Anyways, just a heads up in case you were ever considering adding a mode that automatically excludes a predefined list of words, like this one.

Thank you!

nouns not_shorter_than

I had issues using the not_shorter_than function on nouns. No issue with it on adjectives. It said that I gave one argument when it expected 0.

reference:
RandomWord.nouns(not_shorter_than: 56).next

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.