« first day (1411 days earlier)      last day (1828 days later) » 

7:09 AM
choo choo
Morning!
 
7:26 AM
Morning!
 
it's a slow train today
 
choo choo
 
 
2 hours later…
9:32 AM
 
Sam
10:18 AM
Morning.
 
Morning!
 
!!go
 
10:43 AM
!!cupcake
 
~ One cupcake on it's way for @rene ....
 
Sam
!!cupcake
 
~ Out of dough...
 
lol
 
Sam
Typical.
 
10:44 AM
I'll have that after lunch...
 
Sam
!!coffee
 
~ 418 I'm a TEAPOT
 
Sam
!!gimmetehcupcakez!!
 
~ WUT?
 
!!milk
 
10:45 AM
~ I'm milking the cow ....
 
Sam
!!cupcake
Oh, so now I'm getting the silence treatment.
 
Yeah, that is because we can't have something nice...
 
I feel that that line's going to stick around forever as a Stack meme...
 
~ new cupcakes can be ordered in 6 to 8 minutes...
 
Sam
11:34 AM
@ProgramFOX Wb.
 
Thanks :)
Got to go for lunch, see you!
 
Sam
See you!
 
See you!
 
12:01 PM
Hey there..
 
Sam
Hiya.
 
Heya @Vogel612
 
that's how you get rep!!
+6 -3 not even finished with downvoting the cr*p..
 
Sam
Yeah, I saw one of those edits ;)
 
I posted it as CW directly after submitting..
and the accepted answer is somewhat crappy..
 
12:04 PM
Ugh, closed for the third time.
7
Q: What are all the possible calculations that could cause a NaN in Python?

user961627I've been searching around, and there appear to be scattered discussions about NaNs in different programming languages, including some specific cases, but nothing exhaustive or clear. What are the most common operations that would cause a NaN, in Python, which originate while working with NumPy ...

 
Sam
I'd VtR, if I could.
 
You can see that I voted to reopen last revision so I can't anymore: stackoverflow.com/posts/25506281/revisions
 
@Unihedron aside from the close/reopen thing, how's that question useful to begin with? Isn't NaN always caused by a programming error?
 
There's a meta discussion. (It's still going on.) meta.stackoverflow.com/questions/269887/…
 
Back.
 
Sam
12:11 PM
Mysticial's comment should be MSO's greeting message to newbies,
@tmyklebu Welcome to meta.SO. The mecca of pointless bickering over 1st world problems. — Mysticial 17 hours ago
@ProgramFOX Wb, again.
 
You missed an "i" in the username.
Welcome back @ProgramFOX
 
Sam
Thx.
 
@Sam For my Shadow's Den chatbot, I need a rate limiting function like yours. But AFAIK, your function is not licenced and I licence my project under The Code Project Open License, which means that the license for your function will be different. Do you (or your license) allow this?
 
Sam
@ProgramFOX I licence all my code under GPL v3 (although, I didn't explicitly state a license for that snippet. I can create a Gist with the code and license if you like). So feel free to use whatever you like ;)
 
@Sam Ok, thanks. Where can I find your snippet?
 
Sam
12:19 PM
@ProgramFOX I'll just find the gist...
 
@Sam Not sure what you mean exactly. I thought it was on gist.github, but I cannot find it there.
 
Sam
@ProgramFOX Here. I've added the license as well.
 
yaaay preliminary query for suggested edits finished.
 
Ah, it's a private one.
 
and I borked..
 
Sam
12:22 PM
Now it's public.
 
How can I use it to find out how long I have to wait before I can post?
 
Sam
It's been a while since I last looked at it, give me a moment...
Ok, you see the last if?
 
@Sam Yep
 
Sam
Basically return true where console.log('limit'); is, to signal "you can't post yet".
 
Sam
12:27 PM
That is, I assume you want it to return a boolean value?
 
@Sam No, I actually want to know how many seconds I have to wait before I can post again.
 
Sam
Oh
That should be easy enough, just a sec...
@ProgramFOX Here.
That will return the number of secs you need to wait.
 
@Sam Ok, thanks!
 
Sam
Your welcome!
 
12:44 PM
@Sam How does the function know how many messages I already posted?
 
Sam
@ProgramFOX You need to pass an array of how many secs have passed since each message was posted. For example, 1, 4, 6, 10, would indicate 1 message was posted 1 sec ago, another message was posted 4 secs ago, etc.
 
@Sam I see. Thanks!
 
Sam
@RickyRam Welcome to the SO Tavern.
Np.
 
Sam
1:00 PM
@Unihedron Just noticed you joined github exactly on my birthday (Oct 2) :D
 
@Sam Cheers :D
 
1:17 PM
@ProgramFOX In the JS version check the array ownmsg, it is filled in handleuser
 
@rene My bot is in Python, so that's not very helpful for me.
 
Oh, just to give you an idea: you need a list/array that adds a timestamp to it everytime you post something. I remove the oldest item if the length > 100. I'm sure python has some nice type for that...
That array/list is function global in my script...
 
Ah, I see.
But first I'm going to fix the parser. The builtin JSON parser fails if the JSON contains characters from other languages.
 
1:56 PM
!!cupcake
 
~ One cupcake on it's way for @Unihedron ....
 
Sam
 
Sam
Note the comment.
 
XD
 
2:44 PM
@Sam @rene I use this rate limiter now:
time.sleep(4.15 * math.log((i + 1) % 100) + 1.02)
#post message
It uses Sam's formula but not his entire function; that didn't seem necessary.
 
Sam
Have you tested it?
 
Yes, and it works.
Previously, it never posted the 10th message, but now it does.
And i is (amount of messages sent - 1)
I use the interpretation that's said in the rate limiting answer:
> 1 second between two messages, here's the true throttle curve
I will test it now with some more messages, but for 10 it works fine anyway.
 
Sam
So how do you reset the message count?
 
Using the % 100 part.
 
Sam
Yes, but if you wait 20 secs after the tenth message, you shouldn't have to wait another 20 secs to post the next message. It should reset after a certain amount of time, which is what my function took into account.
 
2:53 PM
ah
Then I'll change the behavior of my program and translate the function to Python; that will work better. Thanks @Sam!
Lol
 
Sam
Anytime ;)
 
I use the rate limiter for a translation chain command in my bot, and I ran this:
in Sandbox on The Stack Exchange Network Chat, 4 mins ago, by ProgramFOX
>>translationchain 20 en en This is a test. I run it in the Sandbox to see what the final output will be.
Output:
in Sandbox on The Stack Exchange Network Chat, 59 secs ago, by FOX 9000
Final translation result (he-en): This is a test . Hlichhb nähdäpään Zhbargz Mhhtotzah sand .
 
Sam
lol
 
interesting, you are switching the chain languages..
 
By the looks of it, it doesn't do klingon correctly...
 
Sam
3:00 PM
Brb...
 
Did someone already said Hi to @Psychemaster ?
 
3:14 PM
@Vogel612 Switching the chain languages?
 
hebrew, german, french...
usually its enough to jump between two
 
Yes, indeed. That's intentional.
I can make a different command for two languages if you want :D
 
yaaay
 
That will become >>translationswitch or something.
 
3:31 PM
@rene I've been greeted before, but not today :)
 
Hiya @Psychemaster!!!
 
Hi @Psychemaster!
 
Hello world! @Unihedron @ProgramFOX
 
3:51 PM
@Sam I tried your rate limiting function, but it does not really work for me; it just posts 17 messages of the 20 messages that had to be posted.
So I will keep using mine, with the % 100 as kind of reset.
 
4:13 PM
@Psychemaster Ok, I felt somewhat responsible to take over after Sam left the room ;)
 
He's still here but eh...
!!cupcake
 
~ Don't hammer me...
 
~ What are you talking about?
 
!!cupcake
 
4:22 PM
~ new cupcakes can be ordered in 6 to 8 minutes...
 
Sam
Back.
 
why does room number 4 not load?
 
Because... It doesn't
 
@AwalGarg Probably that's a mod-only room.
 
Heya @Sam, welcome back!
 
4:33 PM
@Sam Wb.
 
@ProgramFOX you might be correct. See below:
in Sandbox, Oct 15 '10 at 5:02, by Marc Gravell
2 messages moved from Moderator room
 
Sam
@ProgramFOX Thanks. How are you using the function?
 
On chat.SE, I'm sure that room 4 is the mod room, so probably it's the same here.
@Sam time.sleep(ratelimiting(seconds_array))
 
@ProgramFOX the TL? It does load, but just doesn't let any normal user get in.
 
@AwalGarg Yep
 
4:36 PM
You click the request access button, it says okay stand in the queue, and the queue loops back to the button.
It is a private room.
But room 4 here is just not loading
 
@AwalGarg Oh, I see. Then perhaps it's an old mod room.
 
probably
 
Sam
@ProgramFOX And what's in seconds_array?
 
The list of seconds, filled in the way you said. The last element is how many seconds are passed since I posted my latest message.
Well, not really "since I posted", but "right before I posted". Perhaps I should try "right after I posted".
 
Sam
You know it's supposed to be filled like this: newest at index 0 -> oldest at index [list length].
 
4:44 PM
ahhh....
 
5:03 PM
Hmm... unfortuantely, it still does not post all messages. I think I will go with a different approach: if I get a 409 error code, try to post the message again 5 seconds later, and repeat until you don't get the error code anymore.
 
Sam
@ProgramFOX Hmm, would you like me to have a look at teh codez?
 
Sure; I'll commit and upload on GitHub.
 
Sam
Kk
 
Sam
OK, I'll have a look...
 
5:14 PM
Thanks
@Sam This is interesting; I created a translation chain (and it posted 22/25 messages), and 6 minutes after it was done, I started another one, and the first message of that one was posted 7 minutes later, but that chain contained 25/25 messages.
 
Sam
Hmm, ok I'll keep that in mind. Still browsing your code...
 
@Sam I forgot to say; the seconds array of the second translation chain still contains the content of the first one; I think that makes it better, but I thought it was worth mentioning.
 
Sam
Ok.
 
5:31 PM
@ProgramFOX I have something similar as well in my code...
if (jqxhr.status === 409) {
                            //conflict, aka throttled
                            throttle = throttle + Math.round(throttle / 2);
                            console.log(throttle);
                            send(txt);
                        }
That is the Fail code
 
I see. I hope I can do something like that using ChatExchange.
 
if (throttle > seconds(2)) {
                        throttle = throttle - Math.round(throttle / 4);
                        if (throttle < seconds(2)) {
                            throttle = seconds(2);
                        }
                    }
And that is success
 
True win...
 
So I keep a throttle var as well. The only time I saw it throttle was when I and the BOT posted almost simultainously
That last word is probably spelled wrong...
In all other cases the ratelimit function guarantees that the BOT throttles it self
 
Got to go now, see you!
 
5:44 PM
SeeYa!
 
5:59 PM
~ Not everything is star-worthy...
 
 
1 hour later…
7:05 PM
Welcome @Crazy to the Tavern!
 
Hackernews was down for like 10 mins and I got bored so I came here, then it was back and I forgot. DX
 
@Crazy XD
 
Now I'm back to actual work of trying to install python 3.4 on ubuntu 10 and freezing on it. Quite obnoxious.
 
7:47 PM
HI
 
Heya @Aymenworks
 
Somebody is lost here:
Thanks, but I was wondering to try it in MultiThreading way.. I am not sure if its mutithreading — user3853658 32 mins ago
 
8:04 PM
Will sleep; keep up the good work all!
 
Sam
Night!
 
 
4 hours later…
11:51 PM
63
Q: Volunteer to help mentor one of 16 women starting a career in programming

LauraDiversity in tech has become an increasingly urgent issue, both on- and offline. We have always tried to make Stack Exchange an inclusive environment, but we know we can and should do more. One thing that we're excited about doing is participating in a new fellowship at the Flatiron School, an...

^ has anyone noticed? I see some mods I've never seen around. Is it just me?
 

« first day (1411 days earlier)      last day (1828 days later) »