« first day (4953 days earlier)      last day (11 days later) » 

2:11 AM
@roganjosh My experience differs, I have to use "site:stackoverflow.com" or "site:docs.python.org" often in my searches to prevent the for-profit blogs/courses/bootcamps/content-farms from ranking higher than SO, and even then it doesn't necessarily work, e.g. if those blogs slyly reference the corresponding SO link to add credibility. Sometimes if the top hit is a particularly annoying wrong-and-spammy for-profit link, I have to explicitly exclude its site with '-'.
I wonder how our Google settings differ, you're obviously seeing a very different experience?
 
2:26 AM
@roganjosh Suggest make them symbolic constants e.g. WEEKLY_SHRINK_ESTIMATE, put them in a separate section or config file with a header explaining briefly they they are unverified and derived from wild-ass guesses, chewing gum and pieces of borrowed string. Seriously. Then ask management to review those numbers and periodically keep pushing responsibility to them to chck and revise. An explicit disclaimer like that is reasonable inoculation from you being blamed.
 
2:46 AM
@smci with DDG I find that site: options are 100% reliable. - and quotation marks, on the other hand....
 
 
2 hours later…
4:51 AM
@inspectorG4dget Multiline chat messages (and URLs) can be quite long. But a month ago someone temporarily broke one of the chat servers while trying to find the limit. chat.meta.stackexchange.com/transcript/89?m=9817303#9817303
 
 
2 hours later…
6:41 AM
@smci it's the most uncomfortable situation I've ever been in. They sacked off the 3rd party that was originally doing the predictions because of inaccuracy, then every single meeting I've had since was my figures benchmarked against them and using the fudge factors they've derived with no explanation. Then in the last meeting - "well, you haven't demonstrated your accuracy against the real figures". No, you idiots, you made me throw that entire model in the bin
Corporate logic be:
1 - Sack off the 3rd party provider because you hate their accuracy
2 - Bring the development in house
3 - Repeatedly criticise the new model figures for not matching the 3rd party predictions
4 - Force in figures derived by 3rd party in a black-box fashion
5 - Throw the in-house guy under the bus for not building something new
The best part is that I have to make refreshed predictions each week based on some proxy measure of shrink. We never actually know the real figure until the inventory is formally taken on a 52 week cycle. I might as well have a wacky-waving-inflatable-tube-man's arm dictating whether the forecast increases or decreases. That would at least have some physical input to the system
 
7:00 AM
Hi Andras nice to see you around again. How have you been?
 
7:11 AM
@roganjosh In such cases what helped me is to prepare clear persentations of the whole projects process, stakeholders and ground truths. So that it is clearer to everybody how insane the process is. You have this map in your head and the outcome is, this is insane, but the others just hear this is insane, without your insight. Give them as much overview of the process as possible and then they will hopefully understand. But also prepare an alternative way to do things. Just saying the current
system is crazy without an alternative will go nowhere
 
The problem is that I already built the alternative and they didn't like the numbers, so I had to morph it back to the figures of the previous company that they didn't like. It's such convoluted logic, which is why I said I'm quitting yesterday. There is no narrative in which this ends well
<faint choo choo sound in the distance grows louder> Yeah, no thanks
 
7:41 AM
@roganjosh Hahaha what do you mean didn't like the numbers? I would really try to focus your energy on that spot, because that is the important spot where improvement and change can and should happen. But ofc some people are very dense and it's better to just switch
 
The direct team I'm working for are not dense people; quite the opposite, actually. But if you've got an old forecast that says "we'll lose £393m this year" and now I say "Actually, I think it's £430m" - that's not a figure they want to have to take up the chain and stand behind again. Especially since it only comes out in the wash when the inventory gets taken. So I understand their conflict. On one hand, I need to stick to the pill the CEO is already swallowing...
... whilst also coming up with something new. That's just not a tug of war that I want anything to do with.
 
@roganjosh what do you mean comes out in the wash? This seems like an important sentence, which has zero information content for me, maybe because I'm not a native speaker
 
The only time the figure is actually known with any kind of accuracy at all is when an independent auditor comes in on a 52 week cycle (offset for each of hundreds of stores). In the interim, there are only very loose proxy values to go by and they are grossly wrong
Come out in the wash is just an idiom. There is no literal "wash"
 
8:28 AM
@roganjosh I really don't get the conflict? Can you explain it better? You try to predict something and periodically you get ground truth. Where is the conflict?
 
Because the business has to forecast profit and loss. I've just told them I think they're about to lose ~£40m more than they thought. That has to go back to shareholders. Would you like to tell shareholders they're about to lose £40m more than previously predicted? These figures are under intense scrutiny.
If the CEO has accepted and communicated a forecasted loss then you better be damn sure about the figures of an adjustment on that
Not a net loss, but a greater deduction*
 
8:49 AM
@Hakaishin tired but fine, thanks
 
8:59 AM
@roganjosh So as I understand it the main problem is the uncertainty associated with the prediction? Is there a way to quantify that? If 3rd party didn't have any estimate of the uncertainty your target to beat is very easy, basically any certainty estimation is better than what you had before :)
Because just predicting a loss is not your problem. It's the companies problem. You did your job correctly. At least that's how I would understand it, maybe there are some missing pieces which I don't get
@roganjosh Also this sounds like a slow burning ponzi scheme xD
 
9:14 AM
@AndrasDeak--СлаваУкраїні What have you been up to?
 
Working :P I don't have the bandwidth for the usual noise level here so I mostly keep an eye on the room from afar to see if I have to step in. Or if there's some interesting problem I'm on a good position to help with.
 
hmm... I noticed that since 3.11, the bytecode is quite a bit bulkier. I'd seen some of the changes via dis, but I hadn't realized how much impact it would make on the total .pyc file sizes
although maybe something also happened to the marshalling format for the code constants?
 
Hmm, true.
Nothing mentioned in py_compile docs
> Since the massive regression in 3.10 is already fixed, and the remaining regression here in 3.11+ looks to be explained by precise error locations (which were accepted knowing they would increase pyc file size), and there's no specific proposal here to further reduce pyc file sizes while maintaining functionality, I'm closing this issue.
Probably said precise error locations
 
ah, of course
 
10:02 AM
@KarlKnechtel how so?
 
 
2 hours later…
12:08 PM
Hello!
from bs4 import BeautifulSoup
import requests

page_to_scrape = requests.get('https://www.br.de/wettervorhersage/wetterprognose/82475/Zugspitze?stationId=10961')

soup = BeautifulSoup(page_to_scrape.content, 'html.parser')

weather = soup.find('span', attrs={'class':'semiLight'})

for a in weather:
print(a.text)
weather = None?
Why is
 
because nothing was found with soup.find
 
@Qualcuno2 My crystal ball says your content is generated by javascript
 
12:32 PM
@matszwecja Problem is, it should
@AndrasDeak--СлаваУкраїні What do you mean? I followed this tutorial: youtube.com/watch?v=QhD015WUMxE
 
@Qualcuno2 one of a couple hundred dupicates around duckduckgo.com/…
 
@Qualcuno2 If you install NoScript and go to the page with all JS disabled you'll instantly understand.
(Probably best on a 2nd browser)
 
Thanks to all!
 
I wish scraping had worse rep than it has, mostly scraping means stealing nowadays. In the past websites might have had terrible APIs and you had to scrape, nowadays scraping is so often against TOS and I'm kinda baffled by how many people don't care
 
12:41 PM
Most APIs are probably not free
 
@AndrasDeak--СлаваУкраїні Yes, because people put effort into producing what ever you are trying to consume, scraping a website which has a to pay API, means stealing
 
Pay for something, on the internet?
 
@Hakaishin Have you come across meme wars? Stealing seems to be the norm.
 
Well, that's what captcha exists for
 
@Peilonrayz That sounds like such a great justification :O I mean I also pirate series from time to time, but mostly because they are so old you can't buy them anymore conveniently or you can't buy them in Switzerland which is even more sad. For example I would love to support Adult Swim, but they are not available, so I can't even watch Rick and Morty legally :(
 
12:56 PM
@matszwecja I mean captcha are pretty easy to get around these days, especially with large models and other heuristic
 
I really wonder if we are ever going to come up with a better system for goods where the marginal cost approximates zero
 
for example, paddleocr and transformer based ocr work great on the typical text captcha with random noise
 
I haven't seen text captcha in a loooong time
 
Hmmm it's kind of annoying to not know which methods are in place and which are copy
I just ran into arrow.now().replace(hour=4) not being in place, even though I would expect that from replace. Is there a good way to figure such stuff out before spending time on debugging?
 
documentation I guess?
"replace(**kwargs)
Returns a new Arrow object with attributes updated according to inputs."
 
1:13 PM
@matszwecja Yeah, then we are back to debugging. I would same it's the same speed
It would be cool if the IDE could catch that as a warning. Like statement has no effect
 
I'm not sure that's possible
 
I mean the warning exists
 
I did not understand in the questions on SO... why is it that weather = soup.find_all('li', attrs={'class':'wtrText'}) works and weather = soup.find_all('span', attrs={'class':'semiLight'}) does not?
Second one gives []
 
@Hakaishin Function may have any number of side effects
Would you expect print to raise that warning?
@Qualcuno2 Because there is no such element in the source code received from requests.get
 
I don't know how they do it, but I assume that there is a way even if not generic, Turing problem etc. But 4 + 4 gives this statement seems to have no effect. A similar warning on methods which modify a copy of an object would be nice as well. In the end I don't care about the details. That is why I pay the IDE money, for them to figure it out. And ofc I don't want them to solve the impossible to solve turing problem, but heuristics can go a long way
@matszwecja I would not, since it does something which is printing. If I had to implement it I would define certain things which count as sinks and if some statement dumps their results into a sink the warning wouldn't show. So x = 4 + 4 "sinks" it's data into x, just 4+4 doesn't. I know I'm playing very loose with concepts and words here, but I hope you get what I mean
 
1:21 PM
@Hakaishin AFAIK idiomatic Python in-place returns None, new object return anything except None.
Libraries on the other hand...
 
@matszwecja Why does it work for the first one then?
 
conversely, because there is such element. Try print(soup) and finding both tags in the output.
 
@Qualcuno2 I really think you should open the site with NoScript: i.sstatic.net/IXXwZHWk.png
 
@Peilonrayz The link does not work(maybe it's my fault)
It says I have no javascript
 
@Qualcuno2 Exactly, so the content isn't available.
 
1:30 PM
It's a screenshot...
 
@matszwecja Sorry I did not spot it, but I don't know even what NoScript is...
@Peilonrayz The other one worket though
 
@Qualcuno2 You need to evaluate the JS on the page to get the content you want. As you can see the page you are getting doesn't have the content you want without you running the JS.
 
Website you are trying to open requires JavaScript. When you open it in browser, it runs normally. When you try to get its contents with requests.get, you get the page showing error like on the screenshot.
This error page contains no <span class='semiLight'> element, so you get a None / empty list
On the other hand, it does contain <li class='wtrText'> element, so it is found correctly with find_all.
 
@matszwecja Why is one included and the other not?
 
Because error page contains one and not the other.
I don't know how else to explain that
 
1:39 PM
@matszwecja I get it, but is there a logical reason or is it just like that?
 
@Qualcuno2 yes, requests doesn't have js, your browser does
 
Let me swap the question, why do you expect <span class=...> to be there?
 
@Hakaishin I mean, why is there one included and the other not in the error page?
@matszwecja Because there is the other with the class li?
 
But that's irrelevant
 
@matszwecja Ok
 
1:43 PM
@Qualcuno2 Different callers get different responses. You wouldn't tell a 5 year old the same as an adult. Same with browser vs requests. Requests doesn't have the capacity to understand js. So the browser tells it sorry this isn't going to work. Similar to how you would explain something to an adult, but tell a child, sorry we will talk about this when you are older. The analogy is a stretch, but bear with me :)
 
I think I got it, but , hoping it's not me doing something too dumb, why did this work and it does not anymore? I swear it did print out the thing I needed, but it is not anymore... from bs4 import BeautifulSoup
import requests

page_to_scrape = requests.get('https://www.br.de/wettervorhersage/wetterprognose/82475/Zugspitze')

soup = BeautifulSoup(page_to_scrape.content, 'html.parser')

weather = soup.find_all('li', attrs={'class':'wtrText'})

for a in weather:
print(a.text)
 
Tags are there to make certain HTML elements. When someone was writing that error page, they decided to contain something in <li> tag, but <span class='semiLight'> wasn't necessary
 
@Qualcuno2 what do you mean it did work? Just compare the diff to when it did work :P
 
@Hakaishin It should be tha same...
 
@Qualcuno2 Then why do you say it worked?
 
1:47 PM
@Hakaishin Never mind, it worked now. Thanks to everybody for the pacience!
 
...
 
@Hakaishin I swear I did not change anything to the code
 
strange
 
the link is different
 
@matszwecja The code I sent does work now and did not work wend I sent it
 
1:54 PM
@Qualcuno2 do you change anything in the code between when it works and when it doesn't? Like do you change the link?
 
But you're searching for ('li', attrs={'class':'wtrText'}), so it should've always been "working"
 
@Hakaishin The code I've send before did not work and works now, and when I sent it It printed nothing. Now the same code prints the needed part of the website
This one:
from bs4 import BeautifulSoup
import requests

page_to_scrape = requests.get('br.de/wettervorhersage/…')

soup = BeautifulSoup(page_to_scrape.content, 'html.parser')

weather = soup.find_all('li', attrs={'class':'wtrText'})

for a in weather:
print(a.text)
 
So you've needed <li> element, not <span>?
 
@matszwecja only li is available , so I am using that. Anyways, for my scope it could be even more useful.
 
You could be running against rate limiting maybe
 
2:08 PM
No idea
 
2:48 PM
if it works on and off, then yeah, probably ratelimiting is at play here
 
3:08 PM
@roganjosh Hi! Just curiousity: why in relation to DataCamp, specifically? Because this site have high quality courses?
curiosity*
 
@Marco no, the opposite. "Continual personal development" (CPD) is a thing that companies do to make employees feel like they're learning something and that is their chosen platform. I don't want to use the site at all but I have to show I'm engaged with their system
 
Hmm, I understand. Why don't you want to use DataCamp at all?
 
I don't suppose it will matter now anyway. I was gonna watch videos on PowerBI because it was tangentially related to my outputs. Then it wouldn't have been as utterly mind-numbing as their other introductory courses
Because I don't learn through the medium of 4 hours of video
 
hmm, I see
Ok, thanks!
 
3:51 PM
Hello, I'm using oracle 12c in my local server and working fine.
self.connection = cx_Oracle.connect(f'{self.user}/{self.password}@{self.host}:{self.port}/{self.sid}')
but in server it return error like
cx_Oracle.DatabaseError: ORA-12170: TNS:Connect timeout occurred
how can I resolve this issue
 
 
1 hour later…
4:58 PM
@BikashSaud are you able to connect to the database through some database access software? If not, that gives you another datapoint about where the error might be
@PM2Ring hahahaha! that's hilarious! Terrible... but hilarious!
 
5:28 PM
@AndrasDeak--СлаваУкраїні I hadn't really thought about causes much at all at that point. but of course the precise error locations bloat the bytecode, because it has to record data for those instructions for basically any bytecode that could throw
 
5:59 PM
@Peilonrayz then we have the fun with pandas giving an explicit inplace=True argument that doesn't at all work inplace
 
6:13 PM
lol
 
hmm, I used to be an avid tkinter fan, but I have to admit, pyqt is pretty good when you get used to it...
 
 
3 hours later…
8:59 PM
@KarlKnechtel ah, I see
 

« first day (4953 days earlier)      last day (11 days later) »