« first day (3200 days earlier)      last day (1973 days later) » 

00:55
cbg
 
7 hours later…
07:48
cabbage
08:46
@Kevin I ended up just taking the easy route and using hilite.me. The HTML generated is pretty substantial actually.
I don't like the background highlight on strings, IMO the text should be a different colour instead but I can fix that.
I don't know why they went that way :/ I haven't had chance to go through all their different styles, maybe some are more rational. At least it does like 95% of the heavy lifting and the rest is search+replace
Oh, and thinning down the border on the left, because why on Earth do you want a wonky bounding box? :P
 
2 hours later…
10:40
Hi, i was hoping someone can point me in the right direction, i have images and I want to select out any that have any text in the image at all. i have tried to google but not sure what to look into?
Just flat images like .jpg or .png? Have you done image processing before?
jpg images. no i havent done this before
I've barely done any, but I suspect that it's going to be very involved, so I'm trying to manage your expectations
Something like this?
yes kind of, but even more simple.
I've only really skimmed the article, but doesn't it start with still images before moving on to video?
In any case, "python find text in image" is a decent start point as a search
10:51
Just fyi, prepare yourself to invest some amount of time in getting such a solution up and running. It's not as trivial as it may appear at first. Spend some time getting familiar with how images are actually stored and represented, that will help you get a better understanding as you go along.
I don't know why, but the opening video to that article has given me a profound "isn't it yamming amazing what we can do these days?" feeling.
only if you stop and think about it. :P
But these days, seems like no one has time for that.
Very true. I have stopped to think; I should stop doing that and just keep going as though all of this stuff is mundane :P
Aye, after all, they say thinking is injurious to health. Or maybe it was drinking, I'm not sure, i couldn't be bothered to think it through.
10:59
Scientists say that thinking burns calories. A headline like that could solve quite a few issues
Since I'm bored, trivia question: Do you know what a calorie is? People talk about them all the time in the UK (and I assume the US) but I wonder how many know what that unit actually is.
I never have to use it so it's just another unit of energy for me
I think the name derives from heat
To my knowledge, I never used it in any calculations in chem eng tbh
that's weird, since it's a chemist's unit
KJ/kg is more useful
kcal/mol heat and whatnot
11:05
calorie is a unit based on water, it's easier to work in joules
11:19
@roganjosh True, unless you're mostly interested in heating (or cooling) water. :) And of course there's also the good old British Thermal Unit.
Ha, well yeah, if we just did things with water all day, it'd be peachy :P It's also not great because KJ/kg.K changes with water temperature, so I find it an odd unit, frankly
But calories are more annoying, due to the Calorie == kilocalorie of nutritionists. Fortunately, the food people here in Australia switched to kilojoules years ago. But when I was doing science in high school we used calories not joules.
The "bible" for Chemical Engineers is Perry and Green and it has like 20 pages devoted to weird unit conversions
@roganjosh I like how you keep writing KJ with a capital K but kg with a lowercase one ;)
@AndrasDeak mentally it hasn't gone unnoticed. I'm losing touch with my past life :'(
11:24
double down and confuse everyone with kibijoules
IIRC, the calorie is defined as the energy to heat 1 mL of water from 14.5 °C to 15.5 °C. Or is it 1g?
kJ/kg.K? Is that right?
yup
exact same kilo in kJ and kg
@PM2Ring as a physicist I can tell you it doesn't matter because water has a density of 1 g/cm^3 ;)
@PM2Ring 1g, which is also 1ml
Being a physicist or not, this is the foundation of SI, no? :P
I still remember a couple of things in calories: water's latent heat of fusion is 80 cal & latent heat of boiling is 540 cal. Once again, I can't remember if that's per mL or per gram.
11:28
It's not much use because latent heat depends on pressure
Side note: "heat of fusion" is a really weird name. We just call it heat of melting.
That's why we have "steam tables" for this kinda thing
@AndrasDeak Yes, it does. At a certain temperature, which I can't currently recall. :)
and pressure
All of these values are tabulated and it's a must-have for a chemical engineer. Boring as pages of data may be, it's important for things like boilers and they're everywhere from homes to mega-factories
11:31
@AndrasDeak Sure, but that's not so important, since water isn't very compressible.
But latent heat of phase transformations cannot be boiled (heh) down to a single value
@PM2Ring depends on the pressure
@PM2Ring steam is
@roganjosh That's one of the great things about the Net, that it makes it easy to access vast amounts of tabulated data, lots of it for free. When I was in school, I used to browse through the library's copy of the CRC Handbook of Physical and Chemical Data. :)
@roganjosh Yes, of course, but we were discussing that 1 mL of liquid water has a mass of 1 gram.
@PM2Ring I went trying to hunt down my steam tables to show that this is not true. I don't know where I put the book :/
I should say that "steam tables" is a pet name, and it covers other phases
I officially hand in my Chem Eng badge, I can find my copy of Perry's but I can't find my steam tables. It's over :'(
11:48
According to Wikipedia, water has a density of almost 1g/mL at its density peak, which is at 3.98 °C en.wikipedia.org/wiki/Water_(molecule)#Density_of_water_and_ice I'll keep looking for a more exact figure...
A-ha!
> At the bottom of the trench the water column above exerts a pressure of 1,086 bars (15,750 psi), more than 1,000 times the standard atmospheric pressure at sea level. At this pressure, the density of water is increased by 4.96%
I remembered a larger increase. Oh well.
It isn't very compressible, no, but you can't rely on a single figure for everything. The fact is that it does change with pressure, so does its vapour pressure and heat capacity
> "Decree on weights and measures". April 7, 1795. Gramme, le poids absolu d'un volume d'eau pure égal au cube de la centième partie du mètre, et à la température de la glace fondante.
I think I've lost track of what we're discussing but I think it's shown why calories aren't a great unit :P
Oh, I don't even need to find my steam tables, they're online
11:58
@PM2Ring so...what did they miss? :D I guess the kg standard didn't adhere to that definition
@roganjosh Sure. If you want to know about the recently adopted definitions, see this very thorough Q&A physics.stackexchange.com/questions/147433/…
That's gonna take some time to chug through. I didn't realise it was contentious
@AndrasDeak It's not easy to get a lot of decimal places from weighing a mL of ice water. You have to deal with stuff like evaporation, and chemical and isotopic purity.
@roganjosh When you want to measure stuff to as many significant figures that you can possibly get with modern technology, things get complicated. ;)
I can certainly see the need for solid definitions, but I don't think that discussion would have changed anything I was doing as an engineer. I think that discussion is just out of my scope.
When you're dealing with a tonnes of b being combined with c tonnes of d, the precision of the measurements takes a bit of a back seat. Which is totally contradictory with my standpoint on the properties of water. Thankfully I don't need to resolve that contradiction :)
12:18
@roganjosh It's probably out of most technical people's scope, and lightyears out of the scope of the general public. But somebody has to deal with these messy details.
12:51
Does anyone have any input on this question? stackoverflow.com/questions/57133295/…
maybe it's more of a chatroom question
Never did socket based programming in Python
@JackM Based on the rules you should wait 48 hours before asking the same question in chat.
Which IDE is preferable for Python development on Ubuntu ?
12:54
okay, I just figured with 2 downvotes in as many minutes it was probably already kind of a lost cause on the main site
@TheLittleNaruto I get alot done just with vscode
but most of my colleagues seem to use pycharm
@JackM I voted to close but I didn't downvote. My comment tells you the reason I voted to close
thanks
@JackM I was using pycharm on Windows. pycharm is very close to Android Studio w.r.t. features; it's easy for me to start with. But my colleagues use vscode. I think I should give it a try ?
sure why not
I've recently grudgingly accepted to use something other than VS Code when doing Java, really just because the intellij support in jetbrains is so good
@JackM Yeah that's right! For Java/Android It's one of the best IDE
13:01
Actually I do frequently find the IDE features in vscode are lacking for python, like it has a hard time guessing the type of a symbol, but I don't know if Pycharm is any better
the one place vscode blows away jetbrains is Git integration
that Source Control panel in VSCode is so comfortable to use
@JackM Pycharm does that well I think.
PyCharm git integration has been decent so far although I sometimes prefer GitKraken for complex operations (rare)
Never heard of it
@TheLittleNaruto It comes with the GitHub student pack
@JackM That question looks ok to me. It definitely doesn't deserve to be closed as a resource request. But I don't know how you can improve your question. Maybe explain more clearly why you want to look at Ethernet frames.
13:08
@aadibajpai Oh! What is used for specifically ? like what kind of complex operations ?
conjugation
@PM2Ring It's a little vague but that's because I wanted to avoid an XY problem, stackexchange culture is weird sometimes
Hey Andras o/
I was asking about IDE recommendation for Ubuntu
13:09
@TheLittleNaruto It's a full fledged Git client but I mainly use it when resolving conflicts, working with submodules and stuff
@aadibajpai I see
@TheLittleNaruto You can do things like making PRs on github straight from the app
@aadibajpai Yeah that is good feature
We use Google's Gerrit
Very nice question, it'll help me to get started @JackM, I upvoted it :)
@JackM A lot of people will look at that question, see it has a minimal code snippet, and assume you want someone to write you a bunch of code for you, hence the downvotes & close votes. But even if your question were perfect, there's still a chance that some robo-voter will close vote or downvote it. :(
13:15
@PM2Ring We can always reopen once he refreames his question well.
Reopens are really rare
@JackM But it looks like you've got an answer, so it's all good. :)
@roganjosh Mostly because so few on-hold questions actually get fixed. OTOH, it's a flaw in the system that down & close voters don't get notified when a question is edited.
what PM said
@roganjosh Indeed because questions flooding is unstoppable on SO.
@TheLittleNaruto Not really; it's the deficiency that PM 2 Ring has stated. If I vote to close, I never get notified on whether the OP actually changes the question. I rely on lots of tabs, and eventually I need to clear up space so the tabs get closed.
13:22
It's not so bad on the slower sites, but on SO edited questions rapidly get displaced by the torrent of new questions. Also, the quality of the people working the review queues seems to be a lot higher on sites like Physics, compared to SO, where there are a lot of newbies and robo-reviewers.
@roganjosh You can always see it under active tabs, no ?
@PM2Ring Yeah that's what I said ^
? Chrome launches a new process for every tab. I can't just have an unbound number of tabs open, nor can I mentally process all of their content
If I think a question may get improved by the OP I tend to leave a comment. And then I can quickly check questions that I commented on after a few hours, or the next day, to see if there's been any progress.
Not many does that. Good to know that you do.
Equally, I don't see your name on Python close votes. It's not meant as an attack, but have you actually tried to moderate that tag?
13:33
@roganjosh embrace firefox
@AndrasDeak no kidding. I'm literally on the precipice just clinging on to "oh god, maybe I forgot how to log into this pointless site x" :P
Chrome is a bit nuts. It's taking up 30% of my system memory
I've got 471 tabs right now. Of course most of them inactive, but at least I don't have 471 processes.
what?
@AndrasDeak D:
I've got...9 firefox processes I think
13:37
471 tabs. I can't even.
%MEM     TIME+ COMMAND
 6.9 487:58.70 Web Content
 5.3 408:09.07 Web Content
 5.3 212:58.56 firefox-bin
 4.7 207:06.94 Web Content
 4.6  20:02.85 WebExtensions
 4.3 233:58.67 Web Content
 4.2 261:31.78 Web Content
 4.1 197:12.82 Web Content
 3.8 243:37.45 Xorg
 3.4  46:32.69 Web Content
 3.4 218:05.36 Web Content
 2.7  81:04.40 gnome-shell
 1.9   0:34.83 python3.7
 1.8   0:33.41 ipython
it might also be close to 30%
I don't even know what to say. Maybe we'll have a new series of Hoarders for people that don't close tabs. That's blown my mind.
Apr 24 '18 at 20:07, by Andras Deak
that reminds me, I should go decimate my 947 tabs
I must admit I don't spend much time on SO these days. I mostly just respond to cv requests from this room.
OTOH, I currently have 2 answers about black holes on the HNQ, one on Astronomy and one on Physics. :)
@AndrasDeak I think only God-level-browser can deal your way of using it.
13:43
My firefox freezes with around 150 tabs, swap makes the system very slow
I used to have 8 GB of RAM ;)
I have 8 GB now :)...HOw much do you have now?
I don't understand what you guys are doing. Doesn't it take longer to go through that list than re-search the site?
I have 16 GB RAM; still I won't prefer to take the risk of opening those many tabs.
I open up entire stackoverflow on my tabs, about a certain topic
13:46
@Mr.President 16 as of earlier this year
Was about to ask bare except, got it all cleared by previously asked things :)
@roganjosh re-search for what? And what site? I have all sorts of things open that I will want to look at later
@AndrasDeak still tracking all these, Isn't it difficult ?
@AndrasDeak Nice, I would upgrade as well so that I could open up few more tabs
re-search, not research. As in, just remember roughly how to get to the resource you want
13:47
@TheLittleNaruto I'll ask my browser
I mean you have more than 400 tabs; even selecting on will take time
@roganjosh I know, I just didn't want to ping you again with the edit
@roganjosh I use Tree Style Tabs so I can somewhat navigate my mess.
@AndrasDeak ...wait! How ?
@TheLittleNaruto well I'm not the one tracking the tabs...
13:48
On the right side, there is an arrow that opens up a list of open tabs
@AndrasDeak tracking as in which tab you want to check at the moment..
@Peilonrayz those would be bookmarks, though?
@TheLittleNaruto the ones I regularly use are at the very start or at the very end
Pinged you 3 times, such is the horror of typing "wood" instead of "would". My apologies.
13:50
@roganjosh I don't have any bookmarks.
and then once or twice a year I go through my tabs and close those that I no longer need
"and then once or twice a year I go through my tabs" - A Physicist by any chance?
could be :P
in April 2018 I reduced 947 tabs to 31, out of which 191 were SO tabs (mostly for delvoting or "maybe answer later")
I use chrome because it has all my web related data whichever I saved since last 5-6 years
^ my excuse that's keeping me in its grip
13:53
so is mine :D
yeah, wanting all your data to be processed and sold by google is a very good reason
Objectively, it's just awful. It takes up too much RAM and causes me real issues
Mr Naruto ( Not pinging :) ), never use chrome
Can I import all those data to Firefox ?
including saved passwords
What do you mean by "data"?
it depends on what chrome will export and what firefox will import
13:54
Umm.. mostly I am worried of saved passwords
I wouldn't think there's any kind of compatibility between the two (other than bookmarks)
Mr. President <Not Pinging :) >I want to move to Firefox after the motivation received from this generous guy @AndrasDeak
@AndrasDeak checking
Don't take anything I say for granted, I've been using firefox for a looong time and I've only had a short run-in with chrome and didn't like it. And I don't want google in my internet.
Nice move, Mr. Naruto, Chrome is basically there to gather your data .
But if you do switch I suggest getting the developer edition which is a bit ahead of the release version.
13:57
lol I like your name Mr. President :D
@AndrasDeak Ok Senpai
I'll be one, someday... :)
Good Luck :)
Thank you :D, If I become one, I'll buy you a laptop with 64 GB RAM I9...No freezing
14:25
@Mr.President :O
Arigato Gozaimas
@TheLittleNaruto: Anytime Sir, just remember the name... :D
Do Itashimashite
15:21
@Mr.President Only if I knew your name :-|
The one who promised you a laptop, upon becoming a President...Mr. President !!
15:43
What should be done here its unclear. when asked OP says "Will try another time" :O
@AndrasDeak Looks like Mozilla didn't import everything.. and tbh it didn't import even a single bookmarked site
15:57
I'm sorry to hear that
This might be an opinion based question, but is there a standard on what to name a variable with a string value, which has been converted from a number
So if number = 1, should it be str_number = int(number) or number_str = int(number)
So the str prefix before of after the original variable name
typed names like that are often considered a bad practice I think
ohh, I could not find any reference to it in pep-8, but I guess it makes sense
It is mentioned as an anti-pattern here though
for some reason, this is also called Hungarian notation too
Hungarian notation is more specific, but it's close
yes, the type before the variable name, and it states that it has origins from how hungarian names are formed
16:10
try to use semantically meaningful names
so names which can tell you what the value is about in the context of the program
cool, that makes more sense, Thanks!
 
2 hours later…
18:07
Hi everyone
I am trying to create a regex to detect alphanumeric characters(without any spaces)
Is this function I defined good or does it miss some edge cases?
def alphanum(a):
    if re.findall('[a-zA-Z]{1,}[0-9]{1,}|[0-9]{1,}[A-Za-z]{1,}', a):
        return a
    else:
        return np.nan
'without any spaces' in brackets means that I am applying the function on a string where there are no spaces either leading, trailing or in between
What do the {1,} represent? If it's a single occurrence, you can just omit them.
@holdenweb I want atleast 1 but it can be more than that , thats why I used them
It gave even just alphabets or just numbers as true @AndrasDeak
I want only alphanumerics
yes, that's what alphanumerical means
your pattern does "just numbers then just letters OR just letters then just numbers", which is not "alphanumerical"
"alphanumerical" means "doesn't contain anything other than numbers and letters"
18:18
So I am trying to identify cases like '23A'
This is a simple case but there are other cases like '23A223A'
if just letters or just numbers or a mixture of both such as "c0ffee" shouldn't match for you you're not looking for alphanumerics
@RaphX have you tried that last pattern with your regex?
Yeah its returning it
Ah, right. So try "p0tayto !?!?!?!?!?! p0tatoh"
Returning this one as well
indeed
18:21
So its correct or could I be missing some edge cases?
can't you seriously tell from this?
I think its working but I am normally doubtful since many times in the past I thought like that and it failed some edge case later on :D
is "p0tayto !?!?!?!?!?! p0tatoh" something you want to match?
Not really but the chance of such a string coming up is highly unlikely for the test cases I might encounter
But in case I do want to exclude this case, how do I do it?
@RaphX Then you're good, use what you have +1
@RaphX I wouldn't know because I don't know what you want to match. You want "alphanumerics", but oh, just letters or just numbers don't work somehow. But "p0tayto !?!?!?!?!?! p0tatoh" is unlikely to come up so it's OK to match it. Do you seriously not see anything wrong here?
18:26
Yeah I guess I want only mixtures of alphabets and letters :P
:P(ython)
@RaphX alphabets are made of letters
Do you seriously need to exclude the all-letter and all-number cases? I'm very skeptical about your use case.
Sorry I meant alphabets and numbers
Yeah I don't need to exclude them but I need to get the count of this mixutre of letters and nunbers as a proportion of the total
Can you spell out clearly what conditions do you want the function to return True
@DeveshKumarSingh good luck with that
18:30
Only mixtures of letters and numbers but it would be good too if I could remove cases like Andras showed
It's hard for me to understand your regex, plus if you dropp examples which counter your previous ones, we will run into a cycle
@RaphX what I showed is a very obvious pattern you should not be matching
@RaphX okay and what cases do str.isalnum don't solve for you?
@DeveshKumarSingh make sure you read the earlier discussion
RaphX likes wasting our time and I don't want to make it worse than it has to be
str.islanum returns true for pure numbers and pure letters , if I use it I will be getting the whole dataset itself which would be 100% then compared to the total
So my dataset only contains pure numbers or pure letters or a mixure of both
18:33
unorthodox idea: count_of_RaphX_items = count_of_alnum - count_of_alpha - count_of_digits
Yeah that seems better compared to what I am doing @AndrasDeak
it would also work unlike what you're doing now
Ok I will try this one , thanks@AndrasDeak
@RaphX It returns false if there is atleast one character in the string which is not alphanumeric, so '123abc'.isalnum() == True but '123abc$'.isalnum() is False, so I think you might need to subdivide the notion of "mixture of both"?
anyways, if the suggestion by Andras works for you, that should be great
 
3 hours later…
21:46
cbg all
I've come across some weird behaviour in my dataframe. In one of the series, the rows consist of \n characters and I can see them clearly in the dataframe/series output..but when I do series.str.contains('\n'), I only get False. Similarly, series.replace('\\n',' ', regex=True) does not do anything.
22:13
I found it, it appears that these are not newlines in the first place, but heavily escaped \n characters..so series.str.contains('\\\\n') returns True

« first day (3200 days earlier)      last day (1973 days later) »