« first day (3559 days earlier)      last day (1372 days later) » 
00:00 - 17:0017:00 - 00:00

user13415013
5:00 PM
Guys If you know solution, It would be great  about my question about colab. Although this question is asked alot of times, but little to no answer.
stackoverflow.com/questions/62552940/…
 
This is the best I could do, paring down the typing problem to its essentials. In principle, the legal types for g and h should be identical, so it's curious that h passes all tests when g doesn't.
My wild guess is that mypy has logic for flattening Union[Dict[k1, v1], Dict[k1, v2]] into Dict[k1, Union[v1,v2]] but it's failing here
@MisterMiyagi, I'm tempted to post a question on the main site about this. Do you mind? I don't want to steal your thunder, since you brought the problem up in here to begin with
 
5:23 PM
@Kevin Go ahead. The initial question has deviated and I'm 20.000 miles down the rabbit hole already.
 
Cool
 
My hunch is that it's about dict invariance but union requiring variance (X <: Union[X, Y]), but that seems odd here.
Plus, <: looks like a penguin. Not a good sign to post a question.
 
I don't feel so bad for thinking to post that now, thanks :) I was tempted, then thought "you have no idea what this is about, so quiet from the Peanut Gallery" :P
 
TBH, the major appeal of typing for me is that it prevents stupid mistakes. That is not a given if you need three PhDs to make sense of the tooling.
 
5:29 PM
@nerd open task manager and kill the chrome processes (or colab app)
also re-cbg all
 
I also think the answer will involve invariance, because Mapping doesn't have the problem that Dict does, but even with this suspicion in mind I can't draw up a mental map that explains all three of my functions
 
Ok, I used the `convert` from https://pypi.org/project/docx2pdf/ and it is giving me
File is open error. It's an internal error. Can something be done about it? http://dpaste.com/0JQWTJG . Sending a single message only
 
Either Dict always barfs when the value is a union, in which case both g and h should fail, or Dict shrugs when its value is a union and lets in too many values, in which case both g and h should pass
 
@Kevin The thing I don't get is that mypy seems to have no problem when the Dict[str, Union] is top-level.
 
Same
 
5:34 PM
@VisheshMangla well, do you have the file open in Word?
 
@nead - I also added a comment to that question
 
I need to go perform penance for asking a question containing the phrase "I can solve the problem with this simple and straightforward solution, but I'm not going to, and I'm not going to explain why not :^)"
 
nope, I didn't open it . The python script opens it. Some libraries are doing that in my code.
 
The script we can't see? Great. I can't stress enough how bored I am of these kind of posts now
 
And also penance for asking a question and immediately going to lunch before reading any comments asking for follow up info
 
5:35 PM
will it be fine to put the whole code? It's a single page script
 
No
 
Regulars, I deputize you to provide follow up info on my behalf while I eat. Thanks in advance :-P
 
ok, I will send two functions(relevant ones)
 
Please don't
 
@Kevin K, probably better as h-angry Kevin is not someone anyone wants answering their questions ;)
 
5:36 PM
@Kevin It makes sense when constructing the type from others. There's no splat in typing.
You cannot unpack or map the elements of a union.
 
I've had enough of this @VisheshMangla. I have done my best to try explain how your questioning is a drain on the room but you continue with obscure posts that are ill-thought-out. I'm not prepared to entertain any more until you show some serious improvement
 
@VisheshMangla There are 2 possibilities: 1) The script is broken - in which case we can't help you. 2) You made a mistake - in which case you need to give us enough code to reproduce the problem.
 
hmm....you know ths really points out the need a good tutorial (blog) on MCE (Minimal Coding Examples) to me.....I was looking for a new subject
 
I say I give you code , you dont allow me
If I remove unnecessary code you say its broken
 
How about having a go at fixing the issue yourself?
 
5:41 PM
It's internal error
 
And
 
microsft word creates a temporary autosave file whenever you open it. That is the issue.
I tried comtypes too
 
Try contacting microsoft technical support. We don't know much about Word here.
 
Great, so you understand the issue. Go spend some time fixing it. And by time, I mean more than 10 minutes. Stop just bringing the issue here
 
its problem of comtypes, this library uses it internally
I m hung on it from yesterday
 
5:44 PM
So file a bug report?
 
I did but I have no hope of replies
I saw the queue
just bug reports no replies
 
the COM interface is also a microsoft product, so they should be able to help you with that too
 
I went to IRC #windows they said we cant help.
 
Unfortunate, as we can't help either.
 
5:46 PM
@VisheshMangla and what is being said to you - is that here can't either... so please stop asking
 
@Kevin ahem...who's we? ;) (but then that's not a bug and I already pointed towards the answer way earlier in chat so I'm not going to double up here so your still good with that statement)
 
yes I saw that @JonClements
 
To clarify; even if people don't know how to fix the issue, the regulars here will normally bend over backwards to try and help. But when this is one issue buried in 5 or more that you bring to the room per day, I think the good will wears thin
 
@LinkBerest If you add all of us up and take the average, we don't know much :-P you're the outlier that the rest of us are dragging down
 
yeah! (but then you dwarf me in other areas so I cannot complain too much about the even average ;)
 
5:50 PM
I personally have negative knowledge about Word, in the sense that I will actively avoid learning about it lest it taint me with its non monospace fonts and smart quotes
I do remember liking WordArt in elementary school, though. Really makes a five paragraph essay pop.
 
Wait, you're on Windows. Isn't using Word the stuff you do all day? While people like me pull up their turtlenecks?
adjusts turtleneck
 
lot of government and academic stuff I do has to deal with Win & Office because of grants so it will be a long while before I can leave it behind (I still use LaTex for most of my actual writing and pray for Server stuff - which is all Linux)
 
<cough> Excel</cough> It's our bread and butter
 
No, no, Word is for journalists and graphic designers. I use calc all day.
 
@roganjosh I hate Excel so much
correction ^ I hate how people use Excel so much
 
5:53 PM
I can't be bothered to download Excel so I use google sheets for all my "putting data into a grid" needs
 
excel is just a poor mans db
plus python
 
@LinkBerest I have a fond memory of going round Waterstones with my best friend and spotting a gigantic book on Excel. I brandished it, saying "look, it's like they compressed my brain". A few years on, I can do basic math operations and that's about it :P
 
No, Access is a poor man's DB (also a sane man's nightmare)
@roganjosh OOOOHHHHhhh! this is a dream of mine
to one day say "I don't know how to do that in Excel"
 
Stay strong mate. Stay strong. It'll happen
 
My dream of our last Access application being turned into a full C# program with standard MS SQL tie-in finally happened - so my hope is strong right now
though I am starting to worry I might end up that old man who talks about Excel the way the old ones talked about paper spreadsheets when I started
^ that was my first job when I was 7 btw. My dad would pay me to look for specific numbers or names or other data in these giant green-and-white paper spreadsheets. I got a nickel for each one I found :)
 
6:08 PM
VLOOKUP would be a slot machine dropping :)
 
@LinkBerest I've got this three-body-problem here, can you solve it in Excel for me? I'll give you my thanks.
 
Is there a safe way to get/replace a file extension from a path, considering that some files have random . characters in them that don't denote the extension? (For example Birthright (Beta 1.0)) I have this problem all the time and it's slowly driving me insane
It's 2020 and we still have file extensions in file names, ugh
 
^^ deleted thank you
 
@Aran-Fey I'm assuming this is something that doesn't work with os.path.splitext?
^ given that the above is pretty common (but still want to check)
 
@anky we should be closing that question, but there's a courtesy 10 min window
 
6:21 PM
Agreed :)
 
So, let's do that
 
Done from my side
 
@LinkBerest Yeah, splitext simply splits on the last ., it doesn't give a flip if it's a real file extension or not (which is... understandable, but also annoying)
 
It's closed. I can't participate in delv-votes but I don't think it was appropriate here
 
>>> os.path.splitext('Birthright (Beta 1.0)')
('Birthright (Beta 1', '.0)')
I'd like to get an empty string or None there
 
6:23 PM
@roganjosh Yeah I agree with you, should have been a cv-pls instead
Will keep in mind :) attacked the answer first
 
yeah, I've never found a really "safe" (and simple) way to do that - in the simpliest cases I just check the last value if I know what extension is expected (i.e. a file like somename.0.1.2.txt.12102019 if not "txt" then ...). Whereas more complex case tend to end up with me building some custom split/regex thing
stem is suppose to work but I've had problems with it too
 
I just looked at wikipedia's list of file extensions and it seems like the only assumption you can realistically make is that "file extensions don't contain unprintables or whitespace"
 
@Aran-Fey someone, somewhere: "hold my beer"
 
heh, yeah they're somewhat (extremely) fuzzy
 
@anky actually, that was a direct answer to the question posed in the title
 
6:32 PM
I see the pun :D @AndrasDeak glad both are closed though..
 
I don't see the pun
 
always fun when you pun without knowing it
 
thats no answer either :/
okay i cannot comment onto my prev comment but OP has edited the question
 
actually on the second one - do you think this question on groupby with apply is a good duplicate....I'm torn as that's not a terrible pandas question
 
6:47 PM
Initially it was though, though we can look at df.xs now , stackoverflow.com/questions/53927460/… , I am not too inclined to close a dupe based on a canonnical though as these cases are not very easy to search
 
@anky didn't really need a flag :)
 
@JonClements you mean my comment ...?
 
yeah, I'm going to leave it - and PaulH already added a groupby.apply answer in the comments and since that worked I'll leave it to them to add an actual answer if they want
 
@anky well the cv-pls you flagged for here... everyone could just have ignored it - we're not socvr :)
so yeah... got some old dos games... and this time I'm making it easy for myself :p
 
yeah! old dos games are always a fun waste of an afternoon :)
 
6:52 PM
okay , sorry for that ..!! I need to learn more @JonClements
 
Is that... Elite?
 
@anky hey - not a problem - don't worry... just saying that it's not something you needed to raise a mod flag for...
 
@JonClements oh! I remember thinking that game was awesome and so cutting edge when it came out
 
:)
 
Solar Winds: The Escape and its sequel Solar Winds: Galaxy also known as Solar Winds II: Universe are top-down, space-themed role-playing action games developed by James Schmalz and published by Epic MegaGames in 1993. The main character of both games, bounty hunter Jake Stone, takes on a series of missions that has him shipping cargo and fending off attackers. The story is told through simple conversations and brief cutscenes. In some ways, the series is reminiscent of Star Control II, without the ship customization and fleet building aspects. == Gameplay == Gameplay is presented in a top-down...
 
6:55 PM
@JonClements took me a while to figure out what's happening but I get it now. What's GW?
 
@LinkBerest I guess .xs worked for OP I mean because the top axis was into consideration..
 
yeah, not worth looking deeper into - if Paul doesn't add an answer I'm sure someone will see the comment and add it on their own for the rep (or not - either way)
 
@Aran-Fey No chance. File extensions aren't standardized, so you could have some app look for 0)). For practical cases, r"\.[a-zA-Z0-9]+" could work.
 
^ see regex - like I said :P ;)
 
@AndrasDeak gw?
 
6:58 PM
The number you seem to be looking for in memory. CW?
 
yeah... it's the total reactor energy you have... it's above "cargo" - think it's GW - font's a little on the unclear side though
 
@MisterMiyagi, @Kevin - expanding my pyparsing sample with some helpful parse actions, I get this quasi-enumeration of allowed types:
List[Dict[str,int]]
List[Dict[str,List[int]]]
List[Dict[str,Dict[str,int]]]
List[Dict[str,Dict[str,List[int]]]]
List[Dict[str,List[int]]]
Dict[str,int]
Dict[str,List[int]]
Dict[str,Dict[str,int]]
Dict[str,Dict[str,List[int]]]
Dict[str,List[int]]
Not 100% accurate, since it converts List[Union[int, str]] to List[int] and List[str] when the union spec implies List[int or str]. But showing these in this manner didn't improve readability much over the original diag string.
I also got the duplicate type constructs that Kevin mentioned earlier.
 
I always thought GW stood for Gigawatts
 
Gigawatts-BASIC? That doesn't make any sense.
 
This chatroom is really cool! Happy to finally be able to contribute
 
7:05 PM
I'm assuming their talking about Solar Winds - I'm like 99% certain GW was GigaWatts but I don't have the manual anymore so not 100%
 
@LinkBerest I'm sure it is...
 
@LinkBerest Well, practically I would do splitext() followed by isalnum() but that is so much typing for chat...
 
LinkBerest at 100% sounds scary
 
It is a rare thing
 
7:06 PM
Didn't we invest in some crystals or something to contain him?
 
it takes 12 crystals - each of a different color and formed during a different month of the year to contain me when I am at 100%
 
We couldn't afford The Vault of Mordru.
 
@LinkBerest and have a help screen shot :)
 
aw, that's cheating ;)
 
7:09 PM
@JonClements ah!
@TheDon welcome
 
@PaulMcG our fiscal policy was so short-sighted :/ I mean, I like the chocolate fountain, but...
 
I don't know whether to be ashamed of how much time I spent playing video games or proud of it when I consider I remembered that tidbit from all of almost 20 years ago O.O
 
@LinkBerest iddqd, idkfa
Similar timeframe for me
 
lol, kinda feel like above but with games
 
rbrb
 
7:26 PM
@anky rbrb!
 
Helloooo. I'm not sure this is the right place to ask. Feel free to escort me from the premises if so. But would it be ok to ask for some help in here? I mean, with python stuff...
 
@LRB83 Hello :) You're welcome to ask questions about Python but please first review the room rules
 
Noted! Reading now :)
 
Particularly the fact that you need to wait 48 hours to ask about a question on main. Please don't ask about your recent question
 
Yeah I just saw that.... I'll come back in a couple of days if I'm still stuck :)
Thanks!
 
7:33 PM
@LinkBerest I use to love this game - myabandonware.com/game/ascendancy-2qs - was a shame the AI patch took so long and still wasn't that great - the game was ahead of its time in quite a few regards...
 
@LRB83 Hopefully you won't need to, but thanks and good luck :)
 
@roganjosh thank you! :D
 
@JonClements heh, I'm a huge fan of worldbuilding (as can be seen on WB.SE) so I loved games like that (I remember that and its terrible AI almost ruining it so I might download it and see if it still lives up to my nostalgia)
 
If I remember correctly one just had to create a file in nougat to get the entire tech tree and be able to build anything or something...
 
don't remember - my brother was the one who cheated usually (which is not to say I didn't take advantage of this from time to time) :p ;)
 
weird thing to derail a good game, the AI
 
Hi folks :)
I thought I understand the concept of neural networks to a basic level but now I need to revise this
I have problems with the last layer of an RNN: what is the meaning of the output exactly? If I specify an activation function, I thought that the prediction (let's say, in a binary classification) is that activation function(output value) is the probability of the classified object belonging to one class
What if I don't specify an activation function?
the default activation function seems to be None, here: tensorflow.org/api_docs/python/tf/keras/layers/Dense
Screenshot of my code:
This mainly follows this tutorial: tensorflow.org/tutorials/text/text_classification_rnn
How do I interpret the predictions the model made, in this setup?
 
 
2 hours later…
Sam
10:15 PM
@zabop I'm not overly familiar with Keras but upon a cursory glance it looks like you've not specified an activation for the final dense layer? Try sticking on a sigmoid and see what you get (hopefully values between 0 & 1.
 
10:51 PM
re-cbg
@zabop Assuming your array is a collection of sentences - that is using a Long short-term memory RNN model to, basically, build the hidden layers of your model. Then when you call predict to make predictions. What do you mean by "how do I interpret the predictions"?
If your having trouble understanding how an LSTM RNN model works you might check out this tutorial on TensorFlow it breaks down the steps with a bit more detail
 
Sam
11:22 PM
I think he's expecting values he can interpret as class probabilities.
 
@Sam I assume similar (which isn't what predict would give by default - though there are distribution methods which allow for that by default if I remember correctly). Hence why I asked :)
though we moved to PyTorch so its been a while since I dealt with Tensorflow and I might be remembering wrong
 
Sam
@LinkBerest yah some of the binary losses in PyTorch have activations internally (I couldn't find any specific details in Keras docs)
 
00:00 - 17:0017:00 - 00:00

« first day (3559 days earlier)      last day (1372 days later) »