|
Yesterday, I asked this question and never really got an answer I was really happy with. I really would like to know how to generate a list of N unique random numbers using a functional language such as Ruby without having to be extremely imperative in...
Started by Esteban Araya on
, 14 posts
by 14 people.
Answer Snippets (Read the full thread at stackoverflow):
How about....
Hmm...
Here's what I think you are looking for in Python:
>>> import random >>> the while loop.
Python with Numeric Python:
from numpy import * a = random.random_integers(0, 100, 5) b = unique are after.
|
|
Hi,
I'm thinking about learning ruby and python a little bit, and it occurred to me, for what ruby/python is good for? When to use ruby and when python, or for what ruby/python is not for? :)
What should I do in these languages?
thanks
Started by feiroox on
, 5 posts
by 5 people.
Answer Snippets (Read the full thread at stackoverflow):
I believe Python is better for this than Ruby Ruby and Python are popular especially for prototyping, but you can also build production software for munging textfiles awk/....
Language (like C) and make a binding for the code .
|
|
In many discussions I have heard about Ruby in which people have expressed their reservations about the language, the issue of monkey patching comes up as one of their primary concerns.
However, I rarely hear the same arguments made in the context of ...
Started by Paul Dexter on
, 9 posts
by 9 people.
Answer Snippets (Read the full thread at stackoverflow):
In Ruby, on the other the Python....
"Does Python include "core" classes in Python (those implemented in C) are not really modifiable.
That alone makes Ruby code much easier to monkeypatch than Python code.
Completely.
|
Ask your Facebook Friends
|
What are the key differences between the "python way" and the "ruby way"
Started by Mark Lubin on
, 8 posts
by 8 people.
Answer Snippets (Read the full thread at stackoverflow):
In my (still non-expert) opinion://www.wikivs.com/wiki/....
I would guess that Python has more available closely working with both Ruby and Python for over a year now.
I love Ruby.
I know very little Python.
To answer.
|
|
In Ruby, is there the equivalent of the __str__() method that you can define on Python classes?
Started by Readonly on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
A valid Python expression that could be used to recreate an object with the same value (given.
|
|
Is it worth learning Python over Ruby and PHP for Web Development? If so why?
Thank you in advance.
EDIT: Related on StackOverflow:
Should I learn Ruby or Python? Django or RoR Rails or Django? (or something else?) Ruby on Rails versus Python What are...
Started by Imran on
, 5 posts
by 5 people.
Answer Snippets (Read the full thread at stackoverflow):
+Ruby : With Ruby you....
Impression of it as someone who doesn't know it :D And I don't have a clue about Ruby ;)
+Python : According to the Tiobe index , Python is more popular than Ruby by a factor of about 2.
|
|
Does a easy to use Ruby to Python bridge exist? Or am I better off using system()?
Started by Eric on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
YMMV....
You could try Masaki Fukushima's library for embedding python in ruby, although it doesn't appear to be maintained.
I don't think there's any way to invoke Python from Ruby without forking a process, via system anyway.
|
|
Is python or ruby good for penetration testing?
I hear python is very good for pentesting. It has got good modules for that. But not a good framework like metasploit.
Started by Sriram on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
Perl is Ruby and ....
Metasploit was written in Ruby, and many fantastic pen tools were written in Python.
As far as I'm concerned, Python and Ruby are much preference.
To answer your question, they're just as good.
|
|
I did google. I may not have searched right. I read on another Stack Overflow question/comment that Python was just like Ruby, as it relates to "everything's and object," and everything in Python was an object, just like Ruby.
Is this true? Is everything...
Started by johnny on
, 8 posts
by 8 people.
Answer Snippets (Read the full thread at stackoverflow):
Yep, as far as I know" is a tad ... .
Everything is an object
So there you have it from Ruby's own website: in Python everything is an object.
From-other-languages/to-ruby-from-python/
As with Python, in Ruby,...
|
|
G'day folks. I'm trying to introduce Ruby at work, and a few people are interested. However, I've been asked to present the benefits of Ruby over Python and PHP.
I've broken this down into 2 parts: 1) show Python and Ruby's advantages over PHP; 2) show...
Started by nickh on
, 12 posts
by 12 people.
Answer Snippets (Read the full thread at stackoverflow):
No, Ruby is not better than ....
If your goal is to show why.
Sorry.
Sure, Python and Ruby are more object-oriented of the Ruby/Python/PHP contenders are any better than the other.
That either is better than the other.
|