« first day (1151 days earlier)      last day (4020 days later) » 

18:02
That's a hell of an elegant solution @JonClements stackoverflow.com/a/16801605/2689986
@Ashish it takes a bit of grokking it would appear from comments
@JonClements Yup, I had to look for the readable version myself :)
30 more comments... artichoke?!
Btw, you are now exactly 20 shy from a great answer Jon.
@AshishNitinPatil aww ty... :)
Doesn't feel like a Tuesday
Phew - just had to double check it was Tuesday then
Interesting comment
Just so you know, within (if I'm correct) is not a built-in. I've never heard of it and I've used Python for ages. — iCodez 19 secs ago
18:24
I guess that's a subtle hint that the OP should write his own within method
within = range(1, 50).__contains__ ?
Maybe... but number guessing games and hangman are getting a bit boring now
Do you think it'd be amusing or soul destroying to be a teacher marking those things
Probably soul destroying
Amusing at first, leaning towards frustration... then jumping off a cliff?
heya @drefty
gotta go, have a nice day all
18:39
rhubarb @Kevin
@Kevin see ya...
Leaving 2 hours early? cries
@DSM good catch on that xrange :)
you just gotta love fabric
its simple and elegant
fab <python function>
and bam! :D
fab destroy the moon
oh... Moon's not gone "bam" as you eloquently put... I feel cheated :(
lol
actually
it would be more like
fab destroy:'moon'
have you run it? did it work?
18:53
Moon is still out there...
as of now.
Darn it
@Games sort your self out and get the moon destroyed - now!
please?
with cream and cherries on top or something
How many ways can one nuke the moon?
del 'moon'
@JonClements is the cherry red? And when did you become gru?
sorry gru from despicable me! :P
18:55
pizza sauce, prunes, smoked cheese, oranges, bacon, duck liver -- how does this sound on a pizza?
It's latex man!
cough
latex?
Dunno about the sound, but it would taste too much I suppose.
too much?
@Peter how about this - send me one - I'll let you know if it's edible or not...
18:58
:):):)
hi @poly
viola! :D The automatic entry generator for the new blog
def make_entry(title='default'):
    today = datetime.today()
    slug = title.lower().strip().replace(' ', '-')
    f_create = "content/{}_{}_{}_{}.rst".format(today.year, today.month, today.day, slug)
    with open(f_create, 'w') as w:
        with open('template.txt', 'r') as r:
            s = r.read().format(title=title,
                                hashes='#'*len(title),
                                year=today.year,
                                month=today.month,
                                day=today.day,
This way we can just run fab make_entry:'My happy Post' and it will generate the file with the timestamp :D
I see no "Puppies are awesome - Yo!" in there...
lol
the format will be in rst and not md
rst ftw! :D
You can use rst if you blow the moon up first
19:06
@JonClements I decided to try it myself :P
with garlic pizza dough
:)
@JonClements go die puppieh!
me uzing rst!
muhahahahhaa
anyhoo
I'm off to sleep
Prolly in the next couple of days
we can get a sopython blog running
@Games get some rest - catch ya laters
19:54
well hello friends
user559633
20:37
dr crowz...
@PeterVaro -- Lets think about this for a second. If you're in the boat, you're not accelerating up or down, so the net (vertical) force on you is 0. The upward force is the bouyant force and the downward force is your weight
By Archimedes<sp?> principle, the bouant force on you is equal to the weight of the water that you displace.
Now, if you take the rock out of your boat, your weight has just decreased by Weight_rock, meaning that the boyant force has also decreased by Weight_rock
or equivalently, you are now displacing less water (by Weight_water == Weight_rock) so the water level goes down
So far, pretty intuitive.
Now, the rock splashes down into the water.
The rock sinks, so it is displacing less than Weight_rock worth of water.
Meaning that you still have less water being displaced than you did before, so, I submit that the water level decreases
.: QED.
user559633
Real answer : need more information to solve
user559633
Better answer: 7
@tristan -- I don't think so. The only assumption that i've made is that the rock sinks ...
21:30
good night guys! rhubarb
user559633
rhubarb
22:03
how is the set() function ordered? it claims to be unordered.. but doesn't this mean that the first element in would be at position [0]?
there is no position [0]
(try it):
set('foobar')[0]
TypeError: 'set' object does not support indexing
I split a sentence into words and place it into a set like this: s1 = set(sent1.split(" "))
but I expect the output to be like: ['Hello', 'awesome', 'world']
but its not haha
Are you sure you don't want a list?
"Hello Awesome World".split() -> ["Hello", "Awesome", "World"]
22:05
hmm
its in reverse order haha
it outputs set(['world', 'awesome', 'Hello'])
the order is arbitrary
I'm new at python, so sorry for this newbish shit
I think you want a list, not a set.
arbitrary meaning random?
@Mittchel -- Not random, but not easily predictable.
22:06
hmm
And the order can change depending on what version of python you're on (or implementation)
and what time you run your program ;-)
>>> set("Wello Hwesome Aorld".split())
set(['Wello', 'Aorld', 'Hwesome'])
>>> set("Hello Awesome World".split())
set(['World', 'Awesome', 'Hello'])
(I guess that sounds kinda random, doesn't it?)
You simply cannot expect a certain order
hmm
sounds logical
but it isn't
What's the point of not wanting to know what order you'll get?
22:08
@ThiefMaster -- Well ... you are guaranteed that iterating over the same set twice will yield items in the same order as long as you don't insert or remove anything from it in between.
But, that's the only guarantee python makes AFAIK.
And it's not useful enough to be mentioned very frequently.
Whats the other difference between a list and a set
a set is intersectable right
lists can have duplicates.
sets support lots of set operations.
You can determine if something is contained in your set really fast whereas for a list it is a good bit slower.
Because it works in a Key Value thing right?
More or less -- In this case, sets are only the "key" part. If you start adding "value"s, then you want a dict
But they work more or less the same.
@mgilson @ThiefMaster thanks for your help
22:25
question; can you make something in autodesk 3ds, with animations, and use it in WebGL? I want to make an interactive crow
probably (don't ask me how :p)
23:02
@JonClements hiya
someone pinged? :)

« first day (1151 days earlier)      last day (4020 days later) »