« first day (2475 days earlier)      last day (2463 days later) » 

12:32 AM
@wim that's really great
the actual magic of copying all those commits around without them stepping on one another's toes is still beyond me, but I guess there's some optional editing involved when there are conflicts
 
12:48 AM
can others delete my answer?
 
Lol, I have coworkers whose go to strategy is save all their junk in another folder, delete, checkout, copy back in instead of merging
 
@AndrasDeak can you try to delv that ^
 
@TemporalWolf that's how I learned git
well I should say, first used git
you don't really learn much like that
 
@AnttiHaapala I'm <20k so no
I think you need -3 for answer delv
> Voting to delete answers with score of -1 or lower
the -3 is for insta-delvoting questions
 
I need to get to 10k on here
 
1:02 AM
@AndrasDeak ah right
 
@AnttiHaapala can you cast a 20k delete vote on your answeR?
if not you should write a feature request hah
 
haha
> If you want an accepted answer deleted, flag it for moderator attention.
from a deleted post there, ironic
python2 man! :(
 
Respect your elders
 
No I mean that it's capitalized
 
1:08 AM
they probably want to abstract away the implementation so they did class Object(object): pass
 
also, what's that Object with uppercase O? — Antti Haapala 37 secs ago
 
ask the answerers
 
In pandas, if I have some dataframe df I can do df1 = df[(df.Vg == 0)] to only take rows in which column Vg has the value 0. Does anyone know how I can do something like df1 = df[(df.Vg in np.array(0,1,0.1))] ?
 
@user129412 look up np.in1d or np.isin in newer numpy versions
if you have only a few elements you could also do df[(df.Vg==0) | (df.Vg==1) | (df.Vg==0.1)]. And watch out for equality testing with floats.
the functions I mentioned earlier might be more efficient as well
 
I wonder what representation of all programmers SO questions represent
 
1:15 AM
So you'd say like df1 = df[(np.in1d(np.arange(-0.3,0.1,0.05), df.Vg))] ?
 
@user129412 I don't have the exact syntax in my head; so do try and see
 
@enderland 5 % of the best and 2 % of the worst.
 
it's also 3 AM here so you're better off not trying to make me guess the correct combination of function calls
 
so in total something like 2.1 %
 
@AnttiHaapala what about the other 93%
 
1:16 AM
no, 5 % of the best, not 5 % of all
 
@user129412 anyway you'll probably want df.Vg to be the first argument
 
@AndrasDeak You're correct, I switched the arguments around, it works
 
@AnttiHaapala so we're missing 95% or so? :)
 
I think the mediocre in between doesn't bother to ask on stack overflow
they can find the answer
the good post the good questions.
and the bad posts all the !mcve tshi.
 
@user129412 When in doubt, use an MCVE. In this case take a 1d numpy array instead of df.Vg and a different, short one for your other array, and see how you end up with a boolean array the same shape as the first
and as I said, beware floating-point arithmetic
if you add columns containing 0.1 and 0.2, don't expect the result to equal 0.3
for that you'd need something like np.isclose
 
1:19 AM
it'd be really nice if every single time that MCVE was posted in chat it automatically linked to the SO mcve example, regardless of whether you do this or not...
 
and if someone posts MCVE thrice within 1 minute, they get autokicked
(either that or there should be a cooldown)
rhubarb
 
Right. The floating points do seem to be getting me. So I'd need something like np.isclose combined with np.in1d
 
1:34 AM
Hey there y'all. So I stumbled onto something that I don't understand. I've already installed Python 3.6.2 which is the latest Python 3 release.
However, today Python 3.5.4rc1 came out. When I clicked on Python 3.6.2, it was comparing 3.6 series to 3.5 series
So, are there 2 different Pythons being developed concurrently? Why should I choose one over the other?
 
2:11 AM
> Python 3.5.4 will be the last "bugfixes" release of 3.5. After 3.5.4 final is released, 3.5 will enter "security fixes only" mode, and as such the only improvements made in the 3.5 branch will be security fixes.
 
How would I come by returning all arrays in a function if i dont know the number of arrays?
 def build_summary(self, vcstype, username, project):
        uri = get(API_PATH['BUILD-SUMMARY'].format(vcstype, username, project, self._token))
        cont = uri.content.decode('utf-8')
        j = loads(cont)

        return build_summary(
            vcs_url=j[0]['vcs_url'],
        )
Im only returning the first array there how would i return all arrays?
 
@ChrisEthanFox what does j[0] do in your code...
 
I might be wrong here
But thats the jsn that i get
 
what is j
 
json
a json array
 
2:22 AM
ok, so what does j[0] mean
 
the first array in the json response
max 30
 
so... how would you go through all of them
 
I would use a for loop to add 1
That doesnt work tho
though
 
why not?
 
putting return inside of the for loop doesnt actually return anything
Let me try it again
 
2:25 AM
well, return will exit the function
 
I have to add the += at the end of the for loop
 for builds in range(len(j)):
            return build_summary(
                vcs_url=j[builds]['vcs_url'],
            )
 
you can just do for build in j too btw
 
yes yes
How can i start off the for loop at 0?
 
what does it start at now?
 
It starts off at 0
but right after the for loop i have to do build+=1
since i cant run it after the return because it exits the funciton
 
2:30 AM
ok, so what if you didn't return there
 
I have to return the data
 
do you have to return it each iteraction of the for loop
 
Well I want to
 
I thought you said this though:
16 mins ago, by ChrisEthanFox
Im only returning the first array there how would i return all arrays?
 
Yeah i would like to return data from all of those arrays
 
2:33 AM
then do you have to return in every loop iteration
 
Id think so yes
 
why?
 
I was thinking, maybe i should leave it up to the user from which array to print data from
Instead of printing all arrays
 
@davidism you could show your your friend it's linked here as a top recommendation for how to learn git on a SE site :)
(I thought that link looked familiar, turns out it was the one being discussed earlier today)
 
2:55 AM
Its never ok to have print() inside of a function is it?
 
3:07 AM
@ChrisEthanFox I am not a qualified person to answer, but why that would be bad?
 
@enderland Yes, I saw that. So clearly 3.5 and 3.6 are different Pythons. Does one offer something the other doesn't?
Keep in mind that I've just gotten Python today, and am starting to learn how to write Python. So I understand nothing about their releases.
 
user3736406
3:23 AM
D
 
@Ungeheuer Are you learning python with a guide or a course?
 
@EnderLook I'm using Python.org's tutorial.
 
Great, maybe I shall do the same. I'm also starting to learn but when I "need" something I "google" it, I haven't do any guide.
 
3:38 AM
@EnderLook I figured it was time to learn because I keep seeing it crop up on ads for internships. I usually google once I'm more settled with what I'm learning, or if the documentation doesn't have a real answer for my question.
But when I start off I'm like a deer in the headlights.
 
There are add for python? Strangely I haven't seen anyone. I only see some add about SQL Alchemy (I don't know what is that).
 
4:30 AM
@EnderLook Sometimes I see things like "Knowledge of: a,b,c, Python, etc. is a plus"
or some applications ask you to toggle all the checkboxes for the languages you know, so I'm adding more stuff.
 
cbg
@Ungeheuer python 3.6 does have some nice features that wouldn't just work at all in Python 3.5
@Ungeheuer @EnderLook we've compiled a list of stuff that is worthwhile to read beyond the official tutorial
the Python 3 tutorial is a must read though
for example these are highly recommended: inventwithpython.com
 
5:08 AM
Anyone here every used Cython? I've just read about it, and find the concept of writing Python, translating it into C...weird as hell. I can't understand the reason behind it existing. I read that it can make things more efficient, but I don't see how the extra step of translating Python to C helps efficiency. There was mention of being able to use C libraries, so I guess that would save the time of writing a Python library that does what an already existing C library does.
 
5:24 AM
ummm
why are you wanting to program in Python and not in C?
 
 
2 hours later…
7:51 AM
Apparently you can't use fragment-only urls in comments. Would have been easy to refer to the answer on the same page.
 
I answered the original question. OP accepted and saidi it is not the answer they're looking for... later I've received a downvote on it because it is wrong...
döner
so did anyone flag it yet?
 
> Oct 31 '11
Wait, what?
Oh, you edited it later as NAA.
 
whoa I didn't make this knowingly, or did they: chat.stackoverflow.com/rooms/150112/…
can it be deleted, what a waste
 
user6845426
8:10 AM
good morning all
 
@AnttiHaapala I have
 
Thanks @AnttiHaapala and others for ur feedback.
 
@AndrasDeak thanks gone @BhargavRao phew :D
 
@AnttiHaapala "continue this discussion in chat" autosuggestion on long comment threads
 
8:14 AM
@AndrasDeak I know but which one created it
 
Your OP?
the owner of the last message most likely
 
@BhargavRao if you're around, you could blast this room chat.stackoverflow.com/rooms/150112/… - that was autocreated from comments for a q that was deleted, so much fail.
 
On phone, can't delete. I'll do that once I'm back on laptop
Anyway, just leaving it will delete it within 7 days
 
ah will it, ok then forget it :D
hmm it's got exactly 15 messages incl the first feed post...
let's see what will happne :D
 
@AnttiHaapala I thought that it was an awesome idea. would it be bad to use?
deleted my answer.
 
Actually I'm new to programming.. I don't know the ground rules.
gotcha thanks!@AnttiHaapala
 
in your case the posted answers did better job.
as for reading global variables by name, do not use eval, but globals()[name]
you can use eval but it is like killing flies with a sledgehammer
 
more like a wrecking ball
if you miss, there goes your house
 
That's a nice explanation @AndrasDeak and @AnttiHaapala. I'll upvote all your posts in exchange your help. Thanks!!
 
@amilapsn please don't do that
 
8:32 AM
@amilapsn umm no.
 
Upvoting is for expressing your agreement with a post, and to signal that it's useful. Upvoting users instead of posts goes against how Stack Overflow works. Votes should be an indicator of post quality alone. Besides, if you upvote a user a lot of times, it will automatically be reversed.
 
lol I was kidding :P
 
not funny lol.
 
cbg ya'll!
 
Seems I asked the right person lol @AnttiHaapala
233
A: What's the difference between eval, exec, and compile in Python?

Antti HaapalaThe short answer, or TL;DR Basically, eval is used to evaluate a single dynamically generated Python expression, and exec is used to execute dynamically generated Python code only for its side effects. eval and exec have these two differences: eval accepts only a single expression, exec can t...

 
8:33 AM
cbg, Ilja
 
How's the summer gone?
 
still going :P
 
Umm just noticed:
 
short pause in heat wave after heat wave right now
how's yours?
@AnttiHaapala you self-approved that :D
 
community approved
 
8:37 AM
yes, that means it was you
OP has binding vote
Community == self-dupe, self-edit-approve
 
@AndrasDeak Been mostly rainy up till now.
 
no...
 
yes... :P
 
I don't think so...
 
I do.
 
8:37 AM
ah yes ... there was a syntax error fixed.
 
oh, unless you edited over it
"improve edit" button perhaps
 
I guess it is the other user who did improve edit
 
oh, you're right, sorry, I completely forgot about this option
 
a person <2k cannot make a suggested edit of 1 character.
so they added [edited], and someone in the queue instaimproved it to accept it right away :D
 
bleh
well, meh
we should get notifications for minor edits as well
 
8:40 AM
and you and your heatwave, you stole our summer!
 
you can have it back :|
 
I wish I could
 
Rainy and ~10-15°C during all of my 2 week holiday :D
 
So yes please, giev heat wave
 
8:41 AM
@IljaEverilä aww
 
highest temperature of the year: 26.3 C
 
Naturally the weather improved when the holiday is over :P
 
3 last summers have been really lame here when it has been scorching in the mid europe
 
perhaps it's your fault
you sent your summer here to have appropriate gloomy weather all year round
 
8:43 AM
hmm 2014: may: highest: 29, june 28.4, july: 30.8, august: 31, september 22...
and how about this year: may: highest 19.0, june 24.0, july 26.3...
 
hey guys what do u think about jupyter.. I think it is good to my reseach work...
 
yes it is
 
it is
 
so far it it is awesome
 
... and our herbs are not growing...
there were places where they had brown ground on xmas and snow on solstice -- summer..
 
8:47 AM
perhaps Finland is on the wrong hemisphere
 
Rukola has grown well, others not so much.
 
rucola of all plants :|
 
@AndrasDeak we very well know your "culinary" inclinations...
 
July high seems to have been 36 degrees, felt like 38 probably
@AnttiHaapala hehe, fair enough
 
you could learn though!
 
8:49 AM
but within my lack of general gastronomical interest, I have further aversions to rucola
 
there is still hope
 
We've been living at my parents because of our renovation, and there's a field next to them. It is a sad sad sight this summer.
 
no there's not, it tastes bad*


*your mileage may vary
 
Doesn't much grow.
 
the carrots were the most awful...
got a bit late start and after I had sowed, then became the cold, and all the weeds got a jumpstart
 
8:51 AM
go new wave and harvest the weeds
 
it is really strange when basil is growing faster on open land than carrots.
 
Carrots are picky about the soil, though
 
could be that too much fertilizer :D
 
drown that yam in nutrients
 
They need properly aerated soil, so more sandy than clay.
 
8:53 AM
I know, this is the very place that we got awesome carrots last year
 
I am wondering if the fertilizer is accumulating there
 
perhaps you misread the label and you bought infertilizer
 
You should make a ditch that'll let the fertilizer run in to the Baltic, that's how the pros do it...
 
8:54 AM
disclaimer: again I slept only <4 hours :D
 
it wouldn't have been bad but I was up for most of the night being annoyed at some neighbours
 
Were they loud?
 
mmm my neighbours do not make any noise except when they're arguing...
 
they were completely silent
But I live in a complex and there are common, open parking spaces. A few months ago two geniuses installed their own parking-space-protector thingies on their own accord, for their private use
in two common yamming parking spots
 
8:57 AM
:D
 
I've been refraining from causing material damage but I'm getting close
there's an owner's meeting on Monday, I'm going to flip some tables
there are ~110 flats in the complex
 
(╯°□°)╯︵ ┻━┻
 
like that
 
omg
 
hmm, how's the ownership organized there?
 
8:59 AM
You need something like this:
 
from one hand, they are monkeys but why wouldnt you sleep because of that? ;d
 
I was busy having imaginary arguments in my head :|
 
yep, can't shut up your mind at times.
 
@IljaEverilä I only need a ratchet which I have; what I'm lacking is authorization to take matters into my own hands
 
Wish there was a turn-off switch.
 
9:01 AM
@AndrasDeak But that's not nearly as fun as drilling the concrete ;)
 
who needs authz
 
@AnttiHaapala well, there are owners, and there's an employed "common representative" who runs the house, i.e. pays the bills, organizes gardening, stops people from stealing parking slots, etc.
 
are you an owner?
 
@AnttiHaapala me if I want to minimize the chance of having my teeth kicked out by counter-interested parties
@AnttiHaapala yup
 
do you own the walls or right to manage?
 
9:03 AM
feels like interrogation xd
 
We own everything, the problem is that it's one owner against the other. I can cause damage by removing their parking-block, but that would be akin to stealing from a thief; it's still wrong
and the "common representative" doesn't give a yam, but that's a chronic problem
that's why I'll try to incite my fellow owners on Monday :P
 
I mean, in Finland the complexes are mostly organized as limited-liability companies
 
I know too little about business to be able to reflect on that
 
with articles of incorporation.
it means on many matters 51 % of shares can overrule over the 49 ..
 
yeah, same here
but those parking blocks are against any possible rule to begin with
we're talking about how we handle abuse by members
 
9:06 AM
if someone rents the apartment for druglords or mafia or so, the company can take it into its possession for a set time.
 
the standard procedure would be that the representative forces them to remove their parking blocks, or they have it removed and charge it to the owners in question
gotta go work, be back later
 
so there's a board that would have all the sane shareholders, and the management reports to it... outsourced.
so... no action, cut the contract.
 
why you're so negative, maybe just talk will be enough
 
I doubt talk is enough with people who install parking-blocks on common spaces out of their own accord
 
ehh, first world problems xd so childish
 
9:28 AM
Cabbage!
 
9:43 AM
i use ffmpeg in my python code using skvideo. I have to explicitly kill ffmpeg object after the thing I've done processing in jupyter because jupyter keeps variables until I shutdown the kernel or explicitly del them. Is there a work around to this? May be an extension. with keyword didn't help me either. I opened ffmpeg object inside def. it didn't work too....
 
jupyter is effectively a REPL, so of course it will keep variables around
 
whats repl?
 
A Read–Eval–Print Loop (REPL), also known as an interactive toplevel or language shell, is a simple, interactive computer programming environment that takes single user inputs (i.e. single expressions), evaluates them, and returns the result to the user; a program written in a REPL environment is executed piecewise. The term is most usually used to refer to programming interfaces similar to the classic Lisp machine interactive environment. Common examples include command line shells and similar environments for programming languages, and is particularly characteristic of scripting languages. ...
 
gotcha
ffmpeg.exe processes gets piled up until it throws some error if I become little careless.
I wonder why with keyword doesn't work... It works with open file objects without any trouble.
 
Because whatever you are using there is not a context manager
 
9:54 AM
how do I know whether a file object has a context mnager?
 
IO objects usually do
 
skvideo.io.FFmpegReader to be exact
 
wim
2020 is looking pretty good ... no flash ... no python-2.x ...
 
what language will they use to implement games now
js with webgl?
 
@wim Wow. Makes me somewhat sad though.
@marxin Probably webassembly
 
@poke looks promising
 
Oops. I might've posted that one last night...
 
It is
 
So guys, I have noticed that in the IT service industry
Everyone prefers to use JAVA
instead of python
except for maybe speed
what does java bring to the table that python cant actually do better?
 
@Anarach uhh, Java is faster than Python.
 
10:30 AM
Hello all.
 
Is it nights and days faster?
 
If done properly, yes.
 
:-(
 
10:31 AM
@MuhammadNouman Hello
cabbage all
 
How are you?
 
ummm Good
thank you for asking
 
Something not right with my CTRL key.
I am fine too.
 
you dont need to ask how i am or stuff for a question you know :-)
you can just simply shoot
@MuhammadNouman This is a python chatroom sir
 
10:32 AM
Be kind to read this
 
I was looking for it till 1 week.
Ok what I was here was: , Check this question:how to get windows........ And my answer:What you want......
 
Nice
 
Oh boy. What's the bet that this OP is actually using something older than Python 2.4? stackoverflow.com/questions/45324200/…
 
They are using the with statement (Python 2.5+)
 
10:49 AM
Ah, good point. :)
And gzip support of with wasn't introduced until 2.7
 
@PM2Ring I doubt the odds on that bet are very good now
 
:)
 
:p
 
Any body know the answer stackoverflow.com/questions/45263353/… I wanted to ask the same question.
 
11:38 AM
I would have zero trust in a Python app, that asked for my Windows credentials.
 
@poke He he he my exact feelings
 
“Hey, currently logged-in user, please enter your password again for me in clear text, so I can verify that you are really the currently logged-in user” - doh
“I promise I will not use the password to change it for you to something random!”
 
"trust me, I'm open-source"
 
And even if the programmer doesn't intend to do anything shady with the password, the fact that the program asks for the password indicates that the programmer doesn't know what the yam they're doing, and I tend not to trust software like that. :)
 
"ask me your password in ten minutes"
"I stored it in this secret file: secret_password.txt for ease of reuse"
 

« first day (2475 days earlier)      last day (2463 days later) »