« first day (3937 days earlier)      last day (994 days later) » 

2:29 AM
Hello!
 
3:14 AM
Καλημέρα από την Αθήνα!
 
3:41 AM
I have almost ready an application in Python & PyQt5.
There are several issues (time delays) to be fixed.
I thought to use QThread in any single operation (create report, import to database,...) to decrease the response time.
Anyone who can help?
For example the application now opens and ready to use in greater the 15 minutes.
It's a huge time if you meter the time to open MS Word.
 
4:17 AM
it is taking 15 minute to load into the app?
 
Yes and i don't really know why?
 
what is it that your app does during the startup?
 
If I deactivate a (main) QThread, then i start time is decrease.
 
if you dont know already, running a CPU intensive Python code in a thread will not make it any faster
 
Well, in some cases it fetch 5 mp3 files from the internet.
 
4:24 AM
ok that is a suitable use case for threading
 
But that's not the case now.
At the start time it fills a QTableWidget from the database.
 
how many rows does this read?
 
For test i have 40 rows and 20 columns (1 column image)
 
ok that should not take minutes even if the code is not threaded
I am assuming this is from a local db and not any remote db
 
yes
in an sqlite3 data.db file
And it's also, mixes 3 sound decks (using pyaudio and pydub) but in start there is no sound to mixx
I will try to increase the sleep time in this while loop.
Now it's just 1 millisecond.
I will try with 15 milliseconds.
 
4:28 AM
have you tried running without these? Idk much about pyaudio but I would guess it does something CPU intensive, in which case would explain the load time
ok but most of this is based on my assumption, so as many users here would suggest, you will have better suggestions if you can come up with an MCVE
 
One problem may be that in every new class i create from main_self i pass main_self (self) as an argument.
Hmm, i cut the mixxx process.
Now app open much faster
$ time python "Papinhio_player.py"

real    0m15.713s
user    0m0.000s
sys     0m0.015s
Now with the mixxx process it open ~ in 4 minutes.
Χρήστος@Chris-pc MINGW64 /c/python/scripts/Papinhio player/src/main/python_files
$ time python "Papinhio_player.py"

real    4m47.304s
user    0m0.000s
sys     0m0.000s
Here is the file that increases the execution time: pastebin.com/7Ansvt81
I make the .exe yesterday.
Same response.
 
5:29 AM
I think is a memory problem, because i check the task manager and now the app uses 800MB and it's still growing.
Without the mixxx the memory use is less than 270MB, and it's not growing.
 
5:59 AM
can someone help me
 
Hello
What's up?
 
Hello can someone suggest running .py(moviepy code) on pypy or some other suitable interpreter. Pypy - scipy installation failed tried many times. Normal python interpreter takes a more time. I am not yet compared with any other because unable installation of scipy in pypy.
 
6:21 AM
Cbg
 
user16280768
Hai, How to extract feature from video and stores it into H5 File
 
6:50 AM
cbg
Django users is there a way to pass an argument to a view function without it appearing within the url
 
@Harry That's like asking "How to find points of interest on a map and store them in a json file?". What on earth is a "feature" supposed to be and how exactly do you want to save them?
 
Essentially this is tthe issue I am having dpaste.com/75Z4YCM33
 
@Kwsswart have you tried looking into Django middlewares?
- https://docs.djangoproject.com/en/3.2/topics/http/middleware/#process-view
- https://stackoverflow.com/questions/28329965/using-middleware-to-add-arguments-to-view-functions-in-django
 
@OhmDios Did you try the pypy wheel for scipy?
 
@MisterMiyagi Thanks i have not yet tried that wheel. tried direct pypy3 -mpip install scipy. Now I try this.
 
7:05 AM
@NielGodfreyPonciano will take a look into it and try figure how to work it ^^
 
@OhmDios Depending on what exactly you need, you might also want to try conda. Apparently, they do have pypy support for numpy and scipy these days.
 
@MisterMiyagi Thanks Anaconda also tried but pypy /pypy3.6 itself not able to install as per their docs. anaconda.org/conda-forge/pypy. Now i am trying with the wheel.
 
Afraid we're somewhat limited in what advice we can give as long as you only say that things failed, not how.
 
@MisterMiyagi Wheel Method installation also failed same like pip scipy--here is the trackback--dpaste.org/jnj6
 
7:22 AM
Ah. Windows.
 
Is it monday again?
 
Anyway, as the error message tells you, you are missing the underlying math library BLAS or LAPACK.
No amount of trying to install the high-level modules requiring these is going to fix it.
@AndrasDeak Isn't it always Monday in rooms/6?
 
@MisterMiyagi There's also a fortran compiler missing
 
@AndrasDeak I've developed a natural filter towards any and all fortran errors during my diploma.
 
lack-of-fortran error :P
@MisterMiyagi eternal September 1 2014?
 
7:33 AM
No, I'm pretty sure this is from before google was invented
 
@MisterMiyagi Thanks its Resolved using Anaconda Environment pypy3.7 py 3.7 installed both numpy and scipy. Have a Good Day!
 
right, I think 3.6 is no longer supported which is why it would have needed compilation
I'm also surprised there's a pypy3.7
 
yes 3.7 is there that supports windows. 3.6 not supports win
 
@AndrasDeak One step closer to finally being able to use dataclasses! \o/
 
@MisterMiyagi is that how we take over the world, Brain?
 
7:40 AM
cbg, back from holidays
 
@AndrasDeak Andras, are you pondering what I'm pondering?
 
I think so, Miyagi. But how can we do it without a fortran compiler?
 
 
3 hours later…
10:29 AM
cbg, I have a flask server that will just download files from a SFTP location and return it in the response, currently the view responsible for this creates a new connection to the SFTP for each request, should I instead start the connection when the application starts and use that connection?
I am using paramiko for the SFTP stuff, for context
flask app* not server (edit window is gone)
 
10:52 AM
In our scope (not flask/web) we usually have a utility function to handle connection pools. Code just requests a connection, and the utility function takes care of creating/accessing/cycling the pool. A single pool that has to live for the entirety of an application can be a headache.
 
that looks like a nice idea, when you say "requests a connection" you return a connection object from the pool and let the function do stuff with that?
isnt this the same as what I do now? minus the pool stuff
 
The pool stuff is the magic sauce. :P
 
laurel, I will look into connection pools then, have not searched with that query
 
11:08 AM
The advice in this question might be appropriate. TLDR: Unless you hit a connection/latency bottleneck, don't bother.
 
I will be using this for files less than 1mb so I will just let this be
I was quite surprised that paramiko had context managers for remote file handling, makes it a breeze
 
need your help with my question guys :(
 
12:01 PM
@Andie31 please wait one more day before asking here as per our rules. If you tag your question with the main python tag that should help with visibility.
 
@AndrasDeak ohhhh ok...ist it 24 hours or so ?
 
@Andie31 read the rules and find out
 
ok, sorry !
 
But if you come back tomorrow and ask again, you should avoid spending 40 minutes of everyone's time trying to figure out what you're really trying to do, only to end up posting what you already have in your question.
 
 
1 hour later…
1:03 PM
cbg
 
 
2 hours later…
2:39 PM
Sounds useful
 
it's 7 years old... somehow, I'm not optimistic
 
Same, sounds useful :D
 
2:54 PM
See, wouldn't it be useful if our messages were automatically removed, now that the original comment is removed? ;-)
 
3:04 PM
#featurerequest :P
 
3:23 PM
even reddit does not have that
 
3:41 PM
We can't just copy whatever reddit does, we've got to innovate
You can't throw a rock around here without hitting three web developers, our UI should be a heartbreaking work of staggering genius
But seriously. Comments on SO and comments on Reddit serve different purposes, and so we shouldn't expect their interface to be identical. In particular, the ideal SO comment is ephemeral; we want it to get deleted once the underlying issue is resolved. [citation needed] [subjective]
 
And SO doesn't have comment threads so it's hardly meaningful to compare the two
 
True. But even if SO adopted a threaded system, I would still expect it to differ from Reddit's model.
"Explain how"
No
 
4:02 PM
That's very much like reddit
 
"Too Redditlike" is my heroic flaw
Hmm, just got a text message from a reputable source saying "here is your [work email provider] verification code: [...]. If you did not request a verification code, please reply with 1". As I hadn't requested anything, I replied with 1. Glowing in the satisfaction of a cyberattack well-foiled, I checked my work email... "your password is expiring soon. A verification code has been sent on your behalf to your mobile phone"
 
Well you said the truth
 
Oops. I hope they lift the "code red - do not allow any verification codes" status from my account before my password goes kaput.
 
this one's on the IT department
 
But doctor, I am Pagliacci an IT department
5
In the end, I managed to resolve the problem without talking to another human. Supreme Victory achieved.
 
4:17 PM
How can i get all mentions done by specific user to me within SO questions?
 
@AndrasDeak Thank you.
you are a huge database for the community :P
 
Dang. I was hoping that there would be a nice clean JSON-y API for fetching response data, which the responses tab would hypothetically use to populate itself. But the AJAXy calls it performs invokes requests along the lines of GET https://stackoverflow.com/ajax/users/tab/953482?tab=responses&sort=all&page=2&StartDate=2021-07-27 16:19:06Z&_=1627402768796, which returns HTML and not JSON.
So you're basically no better off if you forgo scraping the whole page and just scrape the result of the ajax query. You'll still be wading through obtuse HTML to find the data you want.
Semi-relatedly, I might end up writing a scraper myself soon... the website I'm interested in has an API, but it has precisely 0 lines of documentation.
 
Look at the bright side: No blatant lies or misinformation in the docs!
 
Googling "<the website> API" reveals two posts from DenverCoder9, saying "hey, I noticed that <thewebsite's url>/api/v1 just prints "Controller not found: ApiDocs" now. What gives? It used to show documentation"
Skimming the site's TOS to see what their bot policy is, I notice that I have already agreed "Not to intentionally block, remove, or otherwise obstruct the proper functioning and view of advertisements". Oops, i guess I'm a criminal.
 
4:39 PM
Rookie mistake #1: Admitting to the crime. In front of witnesses.
 
Take him away boys, he won't be downloading cars where he's going
I wonder if "I guess I'm a criminal" is actual admissible evidence... Maybe I meant I'm a criminal because I jaywalked the other day, you don't know
I notice the law seems to have some "bro, we know what you meant" stipulations when it comes to arguing semantics at the most basic levels
 
user14492304
Do you have a solution for that?
 
user14492304
When I try to log in to my gmail account with selenium, I get the message "This browser or app may not be secure" And I did not find a solution for it in stackoverflow
 
@Kevin This is why it's important to speak in code
Judge: Do you admit to blowing up the bank vault and stealing the money?
You: No your honor, I most certainly did not use a tar bomb to extract the payload from the money archive.
 
 
2 hours later…
6:37 PM
@Kevin Have you tried the usual swagger page addresses? It might be one of those self-documenting APIs.
"controller not found" doesn't sound like it gets much maintenance :)
 
 
1 hour later…
8:00 PM
stackoverflow.com/questions/68549820/… that question took me like 10 min to understand what the OP looking for :D
 
Cbg!
How can I debug a matplotlib code that does not plot the data?
 
Generally, the same way you would debug any other program.
Look at what the error message tells you. If there is none, use a debugger/logging/prints to understand where your assumptions go wrong.
 
No error :(
 
@Marco how about sharing code and waiting for an answer?
 
So it just does nothing? Or does it make a weird plot?
 
8:11 PM
It plots the window's plot, but without data in it
 
remove the x/ylim settings you added
 
● You may rely on it.
 
This crystal ball here says that your data consists of strings rather than numerical data, leading to a surprise categorical plot.
 
I am testing the plot with a simple line of code, the value of y is a simple numpy float, and the x value is simply a "0" number
 
@Marco that's not a correct answer. We'll only continue with an MCVE.
 
8:14 PM
@AndrasDeak no, I am ploting numbers
Ok, I am thinking...
 
that's a good first step
 
Yes, it is super simple :(
 
you might also want to revise an earlier discussion with this guy having a similar problem
 
hahaha
There is no x nor y limits too
there was even one, but I took it off, and it didn't matter
 
OK. We'll be able to verify that claim when we see the MCVE.
 
8:16 PM
Ok, I will post it
 
excellent
 
post a MCVE
import matplotlib.pyplot as plt

plt.plot(0, 1)
plt.plot(1, 50)
plt.show()
 
Great!
 
A very weird and simple example
 
@Marco Have you read a matplotlib tutorial yet?
And what result do you expect to get from that code block?
 
8:25 PM
Yes
 
import matplotlib.pyplot as plt

plt.plot([0, 1], [1, 50])
plt.show()
 
sssh
and it could also go scatter-wise
 
● It is decidedly so.
 
Well...
I understand the bizarre thing
Is the fact that I only slept like 3 hours last night an excuse?
And programming from around 6 am
But...
If you allow me, I will send another MVCE
Ok
 
8:40 PM
OK, come back after you've had some sleep. You are harming your chances of success.
 
I found out myself.
:(
 
You can just go to sleep instead of posting self-destructing messages
 
@holdenweb Thanks, guys, especially to you for recommending that I go to bed.
@AndrasDeak Sorry haha
@holdenweb I'll read this later, thanks.
 
"So I stayed up for another hour to read why I should get some sleep" :P
 
I helped with something!!
I think it helps to forgive me.
hahaha
I make my final apologies and I will leave...
See you another day
 
9:05 PM
Bye
 
 
2 hours later…
11:32 PM
cbg. Question for all of you, from the fairly basic write each sentence of a text of a different line?: Pythonic way to create a long multi-line string seems not a good dupe target for it. Surely there is some other? I couldn't find one. It's somewhat search-hard.
 
hey
 
11:47 PM
does anyone have any tips on converting a program to oop
i been working on this tkinter and sql app, my code kinda getting out of hand. should probably get it organized sooner than later lol
 

« first day (3937 days earlier)      last day (994 days later) »