« first day (1823 days earlier)      last day (3021 days later) » 

3:00 AM
> Nit Who Fried Chicken
 
hahahaha
 
I'm gone for maybe an hour.
 
Maybe an hour, maybe two. Who knows.
Time is an illusion.
 
Time might be an illusion, but an hour isn't.
 
3:06 AM
Our hour isn't, anyhow.
 
Anonymous
They could say "the connection is probably lost," but it's more fun to do naive time-averaging to give you hope that if you wait around for 1,163 hours, it will finally finish.
5
 
It has friends? Since when?
 
It's strange how you can use time as a stand-in for distance (I live about an hour away from X), but it doesn't work the other way around (I've got three miles of work left).
 
@Geobits that is interesting
 
3:09 AM
Anyway, I can only chat for a few more kilometers.
7
 
@Geobits That depends on the type of work. Road paving, for example.
 
@Cyoce ಠ_ಠ
 
@CᴏɴᴏʀO'Bʀɪᴇɴ ¯\_(ツ)_/¯
 
Reminds me, need to finish that writeup for the predicting starred messages challenge
I swear, there were so many oneboxes in the test data
 
3:11 AM
@Dennis Yea, I thought of that while typing it, but didn't want to be bothered coming up with a better example. I thought surely nobody would point it out :P
 
@Geobits "Surely, nobody will create a language that is shorter than anything else."
s/nobody/Dennis/g
 
Who's Shirley?
 
@Geobits ¯\_(ツ)_/¯
 
@Geobits this made me laugh on loudly
@Geobits Dennis' sister, obviously.
Shirley Golfsalot.
@Geobits yes
 
:27100359 But you must pay for the seventh.
 
3:16 AM
For the record, I can't count.
2
 
Q1.
$1srP

so messy
 
Say I have a program prog.py in a folder. In said folder, there is a subfolder. From prog.py, how can I get all files in that subfolder?
(python question)
 
import files_from_subfolder
 
What if I don't know their names?
 
from sub import *              ?
(just a guess)
 
grc
3:19 AM
@CᴏɴᴏʀO'Bʀɪᴇɴ glob?
 
@CᴏɴᴏʀO'Bʀɪᴇɴ No, that's the module to import. It was a very poorly executed joke.
 
exec(joke); #haha
 
read the folder and then do a for loop on the files and do __import__(filename)
 
@Cyoce I think this works actually
lemme check
nvm
 
3:21 AM
@Dennis Error on line 1: Cannot parse 'joke'
 
@grc Let me check into that
 
I think you'd have to do from subfolder import * and put an empty init.py in there to tell Python that it's a module.
 
@grc This works, thanks (I think)
 
HALP FOR A SEC
 
3:24 AM
A bowl contains 7 red balls and 9 blue balls.
 
@Geobits Lies
 
A woman selects 4 balls at random from the bowl.
 
> blue balls
 
How many different selections are possible if at least 3 balls must be blue?
@Dennis ( ͡° ͜ʖ ͡°)
> 3 balls
 
>_>
 
3:25 AM
#modlife
 
@El'endiaStarman I don't think it worked
 
Are the selections distinct if they both have 3 blue and 1 red?
 
I don't think so
 
Then it can only be [4 blue] or [3 blue, 1 red], no?
 
controller.py
	from bots import *
	print(test(5))

bots/test_bot.py
	def test(x):
		return x + 3

bots/init.py
	(empty)
 
3:26 AM
@CᴏɴᴏʀO'Bʀɪᴇɴ s/\t/ /
 
@Geobits That's what I was thinking, but apparently it isn't correct.
 
@AlexA. s/.+//
 
@AlexA. s#s/\t/ /#ty for using tabs#
 
3:27 AM
@AlexA. I think your "I don't think so" isn't right, then.
 
(For context, I'm helping my girlfriend with her probability homework and failing miserably)
@Geobits In that case I think so
 
HAI ALEX'S GIRLFRIEND
WE ARE SMARTZ N STUFF
 
OH. @CᴏɴᴏʀO'Bʀɪᴇɴ, the init.py file should be named __init__.py.
 
@El'endiaStarman Ohhh.
 
188
A: Python: import a file from a subdirectory

GregTake a look at the Packages documentation (Section 6.4) here: http://docs.python.org/tutorial/modules.html In short, you need to put a blank file named __init__.py in the "lib" directory.

^ source
 
3:29 AM
@AlexA. I guess you could do it the other way, with distinctness not based on color. Something like 16c4 total, then figure out how many have >=3 blue.
 
Anonymous
Alternatively:
 
Anonymous
import os
for f in os.listdir('./folder/*.py'):
  execfile(f)
 
Anonymous
(that's a very bad idea and you shouldn't do it)
 
@El'endiaStarman That works for a single file, but not for from bots import *
@Mego I'll use it if I can't get this to work.
 
@CᴏɴᴏʀO'Bʀɪᴇɴ Don't.
 
Anonymous
3:31 AM
^
 
Then I better find a way to get this to work :P
 
out of curiosity, why not?
 
@Geobits Distinctness not based on color seems so odd given the information in the problem (i.e. color being mentioned and other distibguishable properties not)
 
@Cyoce Mego's code will run all code in every Python file in the subfolder.
 
I mean, I'll use the execfile solution.
 
Anonymous
3:32 AM
For the import * to work, you need to define __all__ in __init__.py
 
@AlexA. I would think so too, but I can't figure out how it wouldn't just be two in that case. Unless order chosen is important?
As in BBBR is distinct from BRBB.
 
Anonymous
Where __all__ is a list of the files that can be imported
 
1 hour ago, by Cᴏɴᴏʀ O'Bʀɪᴇɴ
Not only am I a #Pythnoob, I'm a #Pythonnoob
 
@Geobits If that were the case, the answer would be 5, right?
 
3:33 AM
Should be.
 
That also isn't right.
 
@Geobits What's the question?
 
We tried that earlier.
 
Ask Alex. He keeps being wrong.
 
9 mins ago, by Alex A.
HALP FOR A SEC
(and the following stuff)
 
3:33 AM
@Mego Soo, I can't dynamically get all files from a folder? :(
 
@AlexA. sorry it took a second for that page to load so I ran out of help quota
 
haha
 
@CᴏɴᴏʀO'Bʀɪᴇɴ Considering we do it all the time...that doesn't seem right.
 
Yeah, I know...
 
Anonymous
@CᴏɴᴏʀO'Bʀɪᴇɴ Sure you can.
 
3:34 AM
@Mego TELL MEH
 
@AlexA. Oh, I've been studying for the AMC10 and this seems very similar to some of the practice problems :P
 
@Doorknob !!
(Also what is the AMC10)
 
American Math Competition for 10th graders (?)
 
It's a theater.
 
3:36 AM
@El'endiaStarman :O
@Geobits ಠ_ಠ
 
Sorry, couldn't resist :D
 
Anonymous
 
@AlexA. I think the easiest way to do this is just manual casework. Calculate all four cases of selecting three blue balls (BBBR, BBRB, BRBB, RBBB) and add 'em up.
 
@AlexA.: Do you know the answer to the probability problem, or are you submitting answers to a verification program?
 
C:\Users\Conor O'Brien\Documents\Programming\~A-M\~H-M\KotH>controller
Traceback (most recent call last):
  File "C:\Users\Conor O'Brien\Documents\Programming\~A-M\~H-M\KotH\controller.p
y", line 8, in <module>
    from bots import *
  File "C:\Users\Conor O'Brien\Documents\Programming\~A-M\~H-M\KotH\bots\__init_
_.py", line 3, in <module>
    __all__ = map(lambda x:os.path.splitext(x)[0], os.listdir('*.py'))
OSError: [WinError 123] The filename, directory name, or volume label syntax is
incorrect: '*.py'
@Mego
 
3:37 AM
@El'endiaStarman The latter
 
Also, considering that this is a probability problem, and not just a combinatorics problem, the question might be asking for all possible ways to select balls as if they were distinguishable. Well, sorta.
 
@Doorknob That would give an answer of 5, right? Because it's at least 3 blue, so it can be 4 blue.
 
Anonymous
@CᴏɴᴏʀO'Bʀɪᴇɴ Try ./*.py
 
@AlexA. Hang on, I'm doing it on my calculator now
 
Anonymous
Also try not using Windows
 
3:38 AM
@Mego same error
 
@AlexA. Oh, right, you'd need to take into account BBBB also.
 
@Mego 1) I am not in a position to buy a computer and 2) I like windows because I'm used to it.
 
As there are 9 blue balls, there are (9 C 3)*7 ways to get 3B1R and (9 C 4) ways to get 4B.
 
Anonymous
@CᴏɴᴏʀO'Bʀɪᴇɴ Cygwin
 
Anonymous
3:39 AM
 
Yahoo! Answers seems on point for once.
 
Anonymous
Oh wait I'm doing the wrong syntax
 
@El'endiaStarman Yeah, I think this is accurate
 
Anonymous
Fixed it
 
Anonymous
3:41 AM
@CᴏɴᴏʀO'Bʀɪᴇɴ See gist now
 
okayC:\Users\Conor O'Brien\Documents\Programming\~A-M\~H-M\KotH>controller
Traceback (most recent call last):
  File "C:\Users\Conor O'Brien\Documents\Programming\~A-M\~H-M\KotH\controller.p
y", line 8, in <module>
    from bots import *
  File "C:\Users\Conor O'Brien\Documents\Programming\~A-M\~H-M\KotH\bots\__init_
_.py", line 3, in <module>
    __all__ = filter(map(lambda x:os.path.splitext(x)[0] if x.endswith('.py') el
se None, os.listdir('.')))
TypeError: filter expected 2 arguments, got 1
 
Anonymous
wat
 
@Geobits Wow, and not a single mention of babbies. +1 and accepted.
 
@Mego TypeError: filter expected 2 arguments, got 1
 
Anonymous
Make the first arg for filter None
 
Anonymous
3:43 AM
So filter(None,map...)
 
@Doorknob :chat! is going to get frozen :P
 
@AlexA. Go figure. Googling the exact text of the problem worked >_>
 
C:\Users\Conor O'Brien\Documents\Programming\~A-M\~H-M\KotH>controller
Traceback (most recent call last):
  File "C:\Users\Conor O'Brien\Documents\Programming\~A-M\~H-M\KotH\controller.p
y", line 8, in <module>
    from bots import *
TypeError: 'filter' object does not support indexing

C:\Users\Conor O'Brien\Documents\Programming\~A-M\~H-M\KotH>
 
In unrelated news, I'm trying to golf an essay
 
haha
 
3:43 AM
I'm limited to ≤300 words and I have 312
 
Can general discussion rooms get frozen like that?
 
A user named DonaldTrump just joined the TrackMania server I was on and cheated his way to the first place using a wallhack ಠ_ಠ
 
@quartata yes
 
@Doorknob I can help. I've golfed 100 words off of mine once.
 
#define q <entire essay here>
5
 
3:44 AM
@El'endiaStarman You're exactly right! It's 714 because it's (in R terms) 7 * choose(9, 3) + choose(9, 4).
 
@Sp3000 Standard loophole! :P
 
@Doorknob There are no loopholes in life. You do what you have to do. Make America great again.
 
@Doorknob that's sad. what happened to vi SE?
 
?
 
@quartata whaddya mean, what happened? Most sites' chatrooms are typically nowhere near as active as this one.
 
3:45 AM
^
 
Doorknob just wishes Puzzling chat was this active so he could leave us forever.
 
Anyway, thanks so much for your help, @Geobits, @El'endiaStarman, and @Doorknob! I (and of course my girlfriend) really appreciate it!
 
We should marry Puzzling into PPCG so we could justify the title! #badideas.
 
Anonymous
@CᴏɴᴏʀO'Bʀɪᴇɴ There, it's 100% simpler now
 
@AlexA. Welcome! :)
Combinatorics and probability are a relative strength of mine, but it's a field I'm not particularly excited by. Go figure. :P
 
3:47 AM
nvm i am idiot I thought :set bounty = new main posts
 
C:\Users\Conor O'Brien\Documents\Programming\~A-M\~H-M\KotH>controller
Traceback (most recent call last):
  File "C:\Users\Conor O'Brien\Documents\Programming\~A-M\~H-M\KotH\controller.p
y", line 8, in <module>
    from bots import *
AttributeError: 'module' object has no attribute 'controller'

C:\Users\Conor O'Brien\Documents\Programming\~A-M\~H-M\KotH>
I am so sorry @Mego
maybe it's my problem?
 
@El'endiaStarman I'm also a fan of the strong Bayesian interpretation. en.wikipedia.org/wiki/Quantum_Bayesianism
 
Anonymous
@CᴏɴᴏʀO'Bʀɪᴇɴ No need to apologize; I'm probably doing something silly in my code
 
Nevermind the fact that they are complete opposites.
 
@Mego Oh, okay. Thanks ^_^
 
Anonymous
3:48 AM
You're putting that as KotH/bots/__init__.py, right?
 
First World Problems: Check status on order a day after placing it... still Processing order D:
4
 
I mean, it's been a whole day now! Ship it!
 
Amazon has 12h shipping in my area now. That's just scary. (In the same way 200GB microSD cards are scary).
 
haha
 
3:53 AM
@mınxomaτ Imagine what it's like in Seattle...
They have a distribution center there.
 
Yeah, the dispatch is about 30km from my house. Just a few minutes really.
 
G'night people
 
@Dennis Congrats! \o/ \o/
 
:)
(I should find three things to downvote.)
 
4:02 AM
Congratulations to our memetic, unoutgolfable moderator @Dennis for reaching 60,000 rep!
11
@Dennis yas
 
Oh, also:
^ Congrats @daniero! \o/
4
 
(I tried to make a starworthy post about Dennis' rep and yet no stars. I'm sorry I've failed you, Dennis, my sensei.)
 
> Memetics is a theory of mental content based on an analogy with Darwinian evolution, originating from the popularization of Richard Dawkins' 1976 book The Selfish Gene. Proponents describe memetics as an approach to evolutionary models of cultural information transfer.
o_O
@AlexA. Looks pretty starred to me. :)
 
@Dennis I meant "memetic" as in "relating to a meme." :P
 
Argghhh! I still have to golf 8 words off of this essay. :P
 
4:10 AM
That N-th N contest sure is close. Jelly 8, Pyth 9 and AWK(!) 10.
 
Wait, awk? O_o
 
AWK!
21
A: Remove every N-th N

Rainer P.awk, 10 bytes Input is expected on STDIN, one number per line. ++a[$1]%$1 Explanation Keeps a counter for each number in an associative array, prints only if the counter value modulo n is not zero. Printing is implicit. Long version: ++a[$1]%$1{print $0}

 
... wow
 
Yeah, that doesn't happen every day.
 
For a while I thought I would lose to awk with Pyth on posting time.
 
4:13 AM
Nice golf btw. I didn't expect that you could use a like that.
 
Well that's awkward.
 
@Doorknob Your superpinger is showing o_o
 
Also, 5 variable references in 9 bytes of code has to be some sort of record.
 
@Geobits Jeez dude, put on some superpants
 
Yeah, I didn't think a deserved its one-byte spot until now, @Dennis
Maybe it still doesn't. I'm not sure.
Hello @ՊՓԼՃՐՊՃՈԲՍԼ
 
4:25 AM
Hi
I'm still trying to comprehend the beauty of that awk answer
 
Anonymous
Oh wow his name loaded correctly
 
Anonymous
The gpu driver update I did must've worked
 
@Doorknob Is Vim good for Java?
 
4:42 AM
Vim is pretty much good for everything except Befunge.
If you mean "does Vim have syntax coloring for Java" then yes
 
._.
 
IDK if vim is good for Java, but jQuery is good for you!
 
can someone tell me what command line command to use to start the pandemic KoTH controller pretty please? it's been a hell of a long time since i had to deal with java's oddities
 
crap
2
I forgot to make PlatyPar's range work for a>b
 
nvm got it
 
4:50 AM
@Dennis Someone should make a jQuery for the Java
 
Use Rhino to embed that sweet jQuery directly into it >_>
 
( ͡* ͜ʖ*)
 
@Doᴡɴɢᴏᴀᴛ Dude even ninja'd the domain name
 
@Cyoce How did that get starz?
 
4:58 AM
@AlexA. downgoat.com is available tho for 2.99
 
@ՊՓԼՃՐՊՃՈԲՍԼ Isn't Starz a TV network?
@Doᴡɴɢᴏᴀᴛ downgoat.edu or gtfo
 
downgoat.xxx
 
xD0WnG0Atx420x
 
Anonymous
@Geobits ಠ_ಠ
 
> Sorry, that name is not available for registration. Please try again.
...
 

« first day (1823 days earlier)      last day (3021 days later) »