I hereby claim:
- I am bizworld on github.
- I am bizworld (https://keybase.io/bizworld) on keybase.
- I have a public key ASCz9vmIPmd-VJWee77zGWQjMPJSDmn2xKmOJN5ULU_nrQo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
class MyStreamListener(tweepy.StreamListener): | |
def __init__(self, api=None): | |
super(MyStreamListener, self).__init__() | |
self.num_tweets = 0 | |
self.file = open("tweets.txt", "w") | |
def on_status(self, status): | |
tweet = status._json | |
self.file.write( json.dumps(tweet) + '\n' ) | |
self.num_tweets += 1 |
A Hash is like a cabinet full of tagged folders. When you open the cabinet, you can choose the folder at a glance. A Hash stores data in key/value pairs. The new hash is the cabinet (just think about it as the name of the hash), the keys are the tagged folders, and the values are the sheets of paper inside the folder (think of the papers as Strings, Numbers, Arrays, etc).
Hash keys, unlike like Arrays, can be: (1) strings, (2) numbers, (3) symbols and (4) arrays (though i don't see any use for this).
Unlike arrays, theres no need to know the order of the item. Therefore, a Hash is very useful for storing data (models) without any particular order.
Hash values can be any ruby object. E.g: objects, methods, strings, numbers, floats, etc.
See http://www.authorama.com/pragmatism-2.html
The history of philosophy is to a great extent that of a certain clash of human temperaments. Undignified as such a treatment may seem to some of my colleagues, I shall have to take account of this clash and explain a good many of the divergencies of philosophers by it. Of whatever temperament a professional philosopher is, he tries when philosophizing to sink the fact of his temperament. Temperament is no conventionally recognized reason, so he urges impersonal reasons only for his conclusions. Yet his temperament really gives him a stronger bias than any of his more strictly objective premises. It loads the evidence for him one way or the other, making for a more sentimental or a more hard-hearted view of the universe, just as this fact or that principle would. He trusts his temperament. Wanting a universe that suits it, he believes in any representation of the universe that does suit it. He feels men of o
<body> | |
<div id="press_button">Press</div> | |
<div id="space"><div id="line"></div><div id="time"></div>Don't for get to read all the articles on how to be a better person. It might come in handy! Or not...</div> | |
</body> |
<body> | |
<div id="press_button">Press</div> | |
<div id="space"><div id="line"></div><div id="time"></div>Don't for get to read all the articles on how to be a better person. It might come in handy! Or not...</div> | |
</body> |
Many programming languages, including Ruby, have native boolean (true and false) data types. In Ruby they're called true
and false
. In Python, for example, they're written as True
and False
. But oftentimes we want to use a non-boolean value (integers, strings, arrays, etc.) in a boolean context (if statement, &&, ||, etc.).
This outlines how this works in Ruby, with some basic examples from Python and JavaScript, too. The idea is much more general than any of these specific languages, though. It's really a question of how the people designing a programming language wants booleans and conditionals to work.
If you want to use or share this material, please see the license file, below.