« first day (3111 days earlier)      last day (1820 days later) » 
00:00 - 15:0015:00 - 00:00

12:00 AM
@AndrasDeak And with this:
15 hours ago, by Andras Deak
@U9-Forward half my rep is
That's true,, merging the 2, you would get it
 
yup
 
I only know python...
I want to get 20k
Like you
Chee, destroyed this bot in the sandbox again.
 
12:34 AM
rbrb
 
 
1 hour later…
1:46 AM
cbg again
Just lost 150 rep...
I am unhappy that i lost my rep, but happy that i didn't get too many up-votes so it would cause a big issue
@MartijnPieters OH NO, sorry, i accidentally clicked reopen...
GEEZ, anyways, it is deleted
I thing DirtyBit is the unhappiest.
WHAT, why DirtyBit didn't get the votes back
?
Oh he did
 
2:45 AM
rbrb
 
 
1 hour later…
3:52 AM
@PM2Ring Ok, got it. I didn't know how much "domain knowledge" was expected, and I didn't know that moderation is often performed by people totally unfamiliar with that particular tag.
 
4:17 AM
@JonClements Ugh, one away
 
 
1 hour later…
5:19 AM
hi
my python version is 2.7.15rcl but now I want to update it to 2.7.16 because when I googled the documentation there's one for 2.7.16 and not for 2.7.15rcl. Now, sudo apt-get update python 2.7.16 doesn't work, but sudo apt-get update python 2.7 works, is that what I have to do? (I can't use python 3+ because my course is 2.7+ based)
 
Ugh... Well, probably should install python 3 and follow a python 3 course...
python 2 is gonna be removed in 2020
 
@U9-Forward I'm taking the Google's course because it's so good, then I'll go for 3+
@U9-Forward thank you \0
 
@Moytaba Okay.
 
 
2 hours later…
7:02 AM
cbg
I seem to remember a proposal for python to allow the usage of keywords as variables and stuff, through the use of leading backslashes. Like \for = 'some_val'
was that just a nightmare, ir did it actually happen? can't find it on google or in the peps as of yet
 
Well, doesnt work in my console. if i had to guess, it sounds like a bad dream
(python 3.6 here atm...apparently. darn you dependencies)
 
the usual way to do it seems to be an underscore at the end, such as list_ etc, in PEP8, so i dont see why we need another.
 
well, I remembered it because of this question. he has to fulfill an interface, so he can't just append an underscore, and having a straight forward mapping between the parameter dict and the object representing it would be nice
 
7:17 AM
oh, thats an interesting case. I do not work with classes at all really so far, so my general approach to issues with names have been, as a rule, using the quotation marks to access things whenever a choice is available (such as with dataframe columns).
But class attributes are basically variable names, so that throws a wrench in things in this case
 
7:40 AM
anyone have any experience with opencv here?
 
cbg-ning
 
helloning to you as well
 
@cs95 /o
 
8:39 AM
@Moytaba shame on google. Python 2 was broken in subtle ways that's much harder to unlearn than never learn in the first place. In particular, strings and bytes.
@U9-Forward "accidentally"
There's a popup that asks if you really want to undelete.
And why are you even pinging Martijn with that?
Too bad all those people have farmed a lot of rep so they can all "accidentally" undelete
@user14492 this better not be about what you asked last night, to which I left a wall of responses with no reply from you.
 
it is. none of that helps. i was looking for a solution not for code review.
if you have a solution then i'm all ears, but otherwise, don't nit pick to make yourself feel superior.
 
9:02 AM
I really want to help you right now
To feel superior
 
@user14492 Pointing out that you never answered someone's question(s) is not nit picking, and it's definitely not done to make anyone feel superior
 
please do. i'll pray to you for a whole day!
@Aran-Fey other way round
 
it must be one of those days
 
Other way round, how?
 
9:07 AM
@AndrasDeak thanks, Andras
 
don't thank me, thank Guido :>
 
@AndrasDeak Regarding:
21 mins ago, by Andras Deak
@U9-Forward "accidentally"
Lol, yeah
 
@AndrasDeak .... not too sure about this particular one :p
 
@AndrasDeak I never know what does "Enable Guido Mode" mean here
 
there's a youtube link next to that text
 
9:13 AM
I am learning how to use asyncio queue
what happens when there arent items to process and i have consumers running
 
@AndrasDeak That's right...
 
@U9-Forward hmm, OK, I watched it and I'm not sure
perhaps just a joke that Guido can't wait for it to end, I don't know
 
@AndrasDeak I am not sure either :-)
 
@Aran-Fey Andras was nit-picking as you'll see from message above. not me. i pointed out that he wasn't focusing on question i posed.
 
I didn't see Andras do any nit-picking
 
9:27 AM
were you online last night, when I asked the question?
 
Oooh, bold move, Cotton.
 
No, but I read the transcript
 
all the message are definition of nit-picking. I don't understand how you don't see it.
 
I think you are nit-picking
 
the term nit-pick is slowly reaching semantic saturation for me
 
9:30 AM
okay. show me which message was relevant to what i actually asked.
 
How about not wasting even more of each other's time?
 
nah. you can leave though. you're not needed.
 
I tried to help and you ignored it, now you want us to meta-convince you that I was trying to help.
@user14492 right back at you
 
grabs a popcorn :P
 
one subtle difference is that you were the one coming here asking for help, not the other way around
 
9:32 AM
really? that's subtle. thought that was obvious.
 
I'm glad we agree
So, good luck in your future endeavours.
I said we're done meta-discussing
 
you're like a walking talking stack overflow mod meme.
yes please hide message. that'll show me how yo're completely inthe right.
 
so I think that verbatim literal idea was also featured on vaultah's banner about recent horrible language design ideas
I always struggle finding it in the transcript
I may have left a SEO message last time but I forgot what it may have been...
 
Jul 10 '18 at 13:59, by vaultah
@AndrasDeak updated version :D I felt more creative freedom in that one
Keywords: creative freedom
 
I'll never remember :'( But I'll try, thanks
rhubarb for a while
 
9:40 AM
@AndrasDeak: Be happy sir, you are the best :)
 
10:12 AM
Well! Well! Well! Look who is here ?
The great kind king TheLittleNaruto himself
 
and most of all, humble
 
Hey Andras :D
 
cabbage
 
Have you ever tried running a script from cronjob which internally execute a python script ?
 
Nope
It should probably work give or take paths and permissions
 
10:15 AM
python is pain when running from cronjob
I am using Python3, linux comes with python 2
That is causing some import issue
 
How old a linux version are you using that doesn't have some form of 3.x on it?
 
Are you using a virtualenv?
 
do you activate it for the cron job?
 
...wait! we have to activate it ? How ?
@JonClements Let me check
 
10:18 AM
How are you using a virtualenv?
Pycharm or conda magic?
 
Just type "python3" and see what you get... normally they'll have 2.7 because of apt/package managers and other utils, but they'll still have Python 3 available as "python3" or easily installable
 
I've seen conda auto-activate envs...
 
@JonClements Yeah it's there.
 
@JonClements still won't help with envs
 
I even added python3 shebang on myscript
@AndrasDeak Pycharm
But this is my local setup
 
10:19 AM
activate your virtualenv manually and then do "which python" and use the executable it points to explicitly instead of just python / python3...
 
So, your crontab entry would look something like:
#0 4 * * * /home/myletterbox/dyhs/venv/bin/python /home/myletterbox/dyhs/update_fragrance_feeds.py
(note the explicit path to the Python executable in the venv)
 
@JonClements wouldn't it need paths being set?
 
Ok Let me correct myself. I am using Pycharm on Windows PC and there I have python configured and it's kinda easy on Windows that I felt. However in Linux both python version are present so to avoid confusion I added python3 shebang on top of my script
 
Yeah... but that'd use the system Python... if you've got stuff installed in a virtualenv - it's not going to see it...
 
10:22 AM
Shebang only matters if you run it as ./script.py
 
@JonClements Ok that virtualenv thing is on windows, that we can ignore now
 
You should run python[...] script.py for explicitness anyway
 
That I tried as well
 
@TheLittleNaruto does the script rely on 3rd part packages, or is it just plain python3?
 
My cronjob is executing every time interval that I had set
 
10:23 AM
I use python3.7 script.py with multiple altinstalls...
 
@Arne by 3rd part packages if you meant any library modules, yes it does.
@AndrasDeak Did you try from cronjob ?
 
The next possibility is --user installed packages with parts of $PATH missing for cron
@TheLittleNaruto you asked me that already :P
 
Oops! Sorry :P
 
Compare echo $PATH and the same fron a cron job
 
So current solution which I did now is kinda worst approach.
@AndrasDeak path to the python script ?
 
10:26 AM
Or is it PYTHONPATH?
@TheLittleNaruto no, literal $PATH. But that won't tell us much I think, I just got confused
 
@AndrasDeak Yeah and you made me confused as well :P
 
$PATH is where executables are looked up but I think you're missing paths to /lib stuff
@TheLittleNaruto sorry
 
If you've made any changes to your PYTHONPATH in your .bashrc or .bash_profile or .profile, it's possible that those files aren't executed by cron and the changes aren't applied
 
@AndrasDeak Everybody became so polite and formal nowadays after code of conduct got introduced to our SE model :P
@Aran-Fey I am sure that I didn't make any changes in that, But I'll check
 
@TheLittleNaruto or maybe that's nothing to do with it and @Andras is just a nice guy? :p
 
10:29 AM
@JonClements Ah! Why I couldn't see it.. You're right, indeed he is. :)
Currently I have put a full aosp image build
Once done, I'll try whatever you guys suggested
 
@U9-Forward Hrm, that post did not need to be deleted. That's just people using delete votes as extra downvotes.
@U9-Forward note that you have yet to cast a close vote on that post, you could just have re-hammered it as a dupe after your accidental reopen.
 
@MartijnPieters I disagree, it doesn't add anything new to the existing dupes with a bunch of dupes of their own
 
anyone know what usually happens when asynchio.queue has an empty queue and consumers are consming
consuming*
 
Signposts are useful...to an extent. A HNQ dupe is the worst.
 
I undeleted, re-applied the duplicate state. Only thing lost is the delete votes (which I'm more than fine with) and a single reopen vote (cleared by U9's reopen, but from someone with no Python connection that I can see).
 
10:36 AM
Those certainly look like clean-up-delvotes, not downvote-delvotes
 
@AndrasDeak that doesn't mean it needs deleting. There's okay-to-good content there.
 
okay...
I'll guess I'll try answering some useful dupes now :P
 
@MartijnPieters Thank you so much Martjin, i really appreciate it, i agree that it should be undeleted, thanks so much, i got my highest voted answer back.
 
yay
 
Also, i can't close deleted posts
 
10:38 AM
I hope we'll keep hearing a lot about that answer in the future.
 
@AndrasDeak lol, :-)
I hope to get +25, :-)
 
@U9-Forward but it wasn't deleted when you reopened. I guess you didn't realise you had reopened it until the post was deleted?
 
@MartijnPieters It was.
Surprising that i reopened after the delete
What, i guess someone just downvoted everybody...
@MartijnPieters Anyways, happy to have it undeleted
Also, thanks for keeping my link
rbrb
@JonClements One more answer to go.
 
10:54 AM
Is it.... thought it was 2 still or something?
 
11:13 AM
apt install python3
python3 --version
 
Wow... this Q has 3 answers... and they've all gone for .rsplit(' ', 1) - does no one actually use .rpartition()...
 
*partition methods have ugly/inconvenient return values in some cases
 
@JonClements what is happening with the latest? "We can be flippant with runtime" --> "exactly my point". Oh my, I best not check SO while on holiday :)
No Greggs here either to console myself :/
 
@vaultah depends whether a guaranteed 3-tuple rather than a list that may not be the size you expect etc...
@roganjosh huh?
 
11:28 AM
ahhh okies :)
 
til about rpartition.
 
I saw your name mentioned on another post on that thread so I assumed, broadly, you were watching it. Sorry for the ambiguity.
 
No worries... so where are you that there's no Greggs? :p
 
The Isle of Wight
I have family down here, but I don't believe I've seen a Greggs. Probably one in Newport - "capital city"
 
Not a terrible place to be :)
 
11:39 AM
Still, we've been properly blessed with sun
 
For now... apparently storms are on the way :)
 
Tis true :/ oh well, I managed to make a lobster of myself already so all is good :)
 
Umm... I like Lobster... what is it with you and always teasing this puppy by mentioning food when you're about... :p
 
Even better, my family has the only seafood restaurant in town :)
"My family". I've just come out of watching the latest GoT lol.
They proudly wave our family banner outside
 
11:56 AM
@roganjosh haha.... lanisters send their regards
 
@roganjosh Probably less blood spilled in Newport though I guess :)
 
hopes no spoilers get accidentally dropped
 
desperately tries not to reference latest developments
I agree
 
anybody good at highcharts here?
 
Unlikely but are you sure your problem needs that?
 
12:07 PM
yes....When i Add 2nd xAxis to my chart.... then my navigator is not scrolling the plot in 2nd xAxis.. it is scrolling only 1st xAxis plot
when i scrolled the top navigator it supposed to scroll all the chart at a time... but it's only scrolling bottom chart.. :(
 
The x-axis is the same between both
I don't I've ever seen a plot where they differ
X is an independent variable and y is the dependent. It doesn't make sense to me that x could be different on the same plot - are you sure this is the right approach?
There's nothing wrong with that graph other than the multiple, duplicate, x-axis
 
i dont know about the approach... but how could i generate 2 scales in the same chart??
 
That would be different y axes
I don't know the library at all, but that graph looks just fine if you drop the second x axis
 
nooo it is not duplicate... it is there for a reason... in my chart there should be 3 plots.. 1-spline, 2-column, 3-bubble......
bubble and column should have 1 xAxis
and the spline should have another
 
That doesn't make sense to me. A graph is an artificial visualisation of data to try make sense of it. The data always exists regardless; do you think that such a plot helps people understand?
 
12:20 PM
yes... they will understand when they know the application... it will be used to analyze news articles
 
Hmm, what's a good way to compress a sequence of unknown length that contains exactly three unique values? I could make "A" into 0b00 and "B" into 0b01 and "C" into 0b10, which lets me fit four values per byte. But this seems inefficient since 0b11 doesn't map to anything.
 
Could you treat it as base 3 and make it an int?
(although that's kind of where you're going by the sounds of it anyway...)
 
I could, but then I wouldn't be able to get the Nth value out of the compressed sequence in O(1) time. But maybe I don't care about that.
The sequence will have a length in the ballpark of 2^15 and 2^20, so process memory may be a consideration
 
I have a feeling that the overhead of trying to compress 1) probably won't be that massively successful and 2) not very practical and 3) no better in space/convenience/performance that keeping it string like...
Umm... so between 32kb and a bit over a meg then if kept in a byte string?
 
"just store it as a string" isn't out of the question. As usual, my personal projects' requirements are dictated by what is fun rather than what is necessary. If I can't find a cool encoding, I'll just do the boring megabyte-long bytes object.
 
12:47 PM
cabbage
 
12:59 PM
@Kevin why not? Divide by 3**N? Give or take
 
Certainly extracting the Nth trit from an integer isn't a lot of work on my end, since it's just one divide and one modulus. But I worry that this sort of arithmetic has linear complexity for very large integers.
 
Good morning!
I gotta a question
 
Can list comprehension be achieved through a lambda function, or if I'm using lambda it can no longer be called list comprehension?
 
1:09 PM
A list comprehension may have a lambda inside it. A lambda may have a list comprehension inside it. I don't know if this answers your question.
 
websockets built on top of asyncio
 
@FelipeOliveira we can use both of them at a same time... one with another
 
@Kevin I can show you the example I have, it is written in julia though (it's pretty simple)
 
lambda x: [y*2 for y in range(x)] is valid syntax, and so is [lambda a: a+b for b in range(10)]
Or perhaps you're asking "is it correct to use the term 'list comprehension' to refer to any expression that converts one sequence to another? For example, list(map(lambda x: x*2, range(3))) turns [0,1,2] into [0, 2, 4]. Is it a list comprehension?". If that's what you're asking, then no. That's not a list comprehension.
 
ohhh I see
yeah, I'm asking if it's correct. I had that question in a test yesterday, and i'm trying to figure out wether I got it right or not
I guess I didn't then haha
I ended up just using lambda
sum = (list -> reduce(+,map(k -> k/(2^k), list)))
init_list = [5, 8, 9, 11, 20, 25]
sum(init_list)
but thanks a lot for explaining it to me! @AchyuthKodali @Kevin
 
1:12 PM
looks somewhat more Haskell (or similar) than Python :p
 
that's julia actually
 
Ahh... I've still not had the pleasure of meeting her yet :)
 
but I was more interested in the concept rather than any language specifics :D
@JonClements it's a pleasure to work with her, at least for academic purposes it works really well!
 
List comprehensions are at least as powerful as the map() and filter() functions found in most functional languages. You can't use them to reproduce the behavior of reduce, however.
You might write your julia code as result = sum(k / (2**k) for k in init_list)
That sum there is the built-in sum btw
 
ohhhh I see
the question asked me to calculate a sum formula similar to the following
So I guessed I had to sum all of them at the end, but I believe everything else should be a List Comprehension and not a lambda expression, and them summ the elements at the end
as you mentioned
 
1:23 PM
If I'm being maximally pedantic, result = sum(k / (2**k) for k in init_list) doesn't contain a list comprehension either. A list comprehension requires square brackets. [k / (2**k) for k in init_list] is a list comprehension. k / (2**k) for k in init_list with a parenthesis on either side is a generator expression.
Programmers coming from a functional language may prefer generator expressions since the values are calculated lazily. Compared to list comprehensions, which construct the full list right away.
 
I see!! that's exactly what I was looking for, and that's exactly how my teacher might have went about that question, I believe
thank you
 
1:42 PM
hmmm... do we have a hint at a secret identity?
And morning cbg
 
I am currently 3 XY Problems deep into this project... Someone lower a rope into this hole I've dug
 
I would but I need another 30 feet of rope to descend one more cave. I swear I'll find the solution in this one.
 
morning cbg here too
 
1:57 PM
What geographic region are you from? Southern California here.
Ooh. I saw a double post and subsequent auto delete.
 
2:14 PM
cabbages
 
I spent a good bit of time yesterday translating the Wikipedia page for calculating sunrise and sunset based on location and Julian date, only to remember that things like Astropy exist about five minutes after I got my code to start producing believable results. It's the journey not the destination, right?
 
@Kevin use regular expressions to get out
 
is anyone familiar with Django?
 
I enjoyed that movie
 
@piRSquared it was a great movie indeed
 
2:23 PM
I'm familiar with Django but that is not saying much
 
I've spent the past week stuck exploring flask/mod_wsgi/(my borked code) and I'm frustrated
 
I only saw the Unchained the version. I can attest that it was indeed off the chain.
 
I built the site linked in my profile with Django, it harvests and displays weather data, very early in development.
 
@AndrasDeak But my third XY problem is already a regex problem
[read the above message in the tone of "but doctor, I am Pagliacci"]
 
Have you considered using threads?
 
2:28 PM
Now prob4lems ha.ve I
 
@Dodge I started the flask tutorial, but figured out that to do much more than that, I need to learn more HTML/CSS/JS than I remember from...1999? That's the talk I'm embarking on now.
 
HTML and CSS are trivial
JavaScript is not, but I am having a ton of fun with eCharts at the moment
 
The quantity of memes about CSS suggest otherwise :)
 
@Kevin What happens when yoda uses regex to parse 1337speak?
 
His apprentice curses him for writing an unreadable project and then dying before writing documentation.
Actually, that's pretty in-character for Yoda.
1.5 XY Problems down.
 
2:33 PM
Standfordbunnyhedron
now you're at the X/ problem
 
I know the correct logic for the current layer but I want to find a way to implement it without writing six different cases.
 
that doesn't fit, with the bunny and the teapotahedron there are 7 Platonic solids!
cbg
 
@AndrasDeak got that apprenticeship:D they were really impressed with my solution:) I shall work with c# .NET from now on:P
 
Nice, congratulations
 
2:37 PM
melon, melon
 
@toonarmycaptain my two cents on the matter is to grab a front end from somewhere like themeforest and reverse engineer to learn how such things are constructed. Don't waste time writing a bunch of JS to handle cross device compatibility for the site-- it's boring, tedious, and can be bought for nothing. Once you see how it's all put together the overall process for creating a web app is, obviously, much easier.
 
anyone on macbook here? thinking of upgrading my Pro 2015 with 1TB SSD, but not sure if it's worth investing around 250 pounds or shall I just wait a couple more years and buy a new laptop
I'm not big on hardware, so not sure i.e. how long will my 8gb of ram be sufficient for modern software, and how fast is my i5 processor ageing these days
 
@Dodge Well, tbh I stuck 'JS' on there because it's so ubiquitous I should at least glance at it. All I ever did when I was messing with web stuff before was nick stuff and change variables/filenames until it did what I wanted.
 
The coolest part about JS is that you can just just open the console on your browser and practice whenever, but this is a Python room so I'll be quiet
 
Well the coolest thing about Python is that you don't have those silly {} indicating blocks of code... so there. PYTHON 4EVA!
 
2:50 PM
I actually missed semicolons and curly braces after switching from C
 
@Dodge ...I experiment with Python in the browser fairly frequently.
 
Yeah, I knew that was coming
 
@Dodge Mostly to check that code from my MS will work in a *nix env, or to check something on a phone.
 
and more specifically that date__lte
 
00:00 - 15:0015:00 - 00:00

« first day (3111 days earlier)      last day (1820 days later) »