« first day (3105 days earlier)      last day (2066 days later) » 
00:00 - 18:0018:00 - 00:00

00:02
cbg
@coldspeed You changed your name? to @cs95 ?
ummmmmmmmm, no
I'm somebody else
no, you're the same person, i can see :-)
noooooooo
he literally just said that he's somebody else
exactly, thank you stranger
00:09
Okay, so looks like you should say Green bean then.
@AndrasDeak Sorry for what i did yesterday, i won't do it next time.
We both hope so.
Let's hope you don't go U9-backward on your promise
@cs95 Using the wayback machine, we see that on January the 24th, someone with your user ID on Stack Overflow was called Coldspeed
@ArtemisFowl Exactly, i new that from the begining, i have a link in history that's user coldspeed, and click on it it is cs95, so it isn't another guy
@U9-Forward If there was ever any doubt
00:14
that's some nice sleuthing there, holmes
@AndrasDeak I keep doing mistakes here...
he knows
Big progress, that's why you were top 0.01 in that week.
dude, like, idk why you think that's me... like, that's some random guy man
00:22
@cs95 Stop trying to be someone else, i told you, if you are, please say Green Bean :-)
The literal definition of Green Bean is "New Python User", which I'm not. Different user, yay, green bean, nay
And also it is strange that you have 142k this quickly, first of all, you would reach rep caps, and can't get anymore.
@AndrasDeak ah, that would explain a lot of ... things
what were you saying about my flair ;)
@cs95 i guess... it is cs for short of coldspeed, and... you were born in 1995...
@cs95 I was wanting to say it still has coldspeed on it, in the image it does, but strange enough, not when it is uploaded here.
cs stands for computer science, and 95 is a two digit number
00:28
@cs95 Then why 95.
Good number?
I considered cs1337 but l33tsp3k isn't my thing
95 is the year of the Boar, which is my favourite meat
not sure what you want to me to say ;)
@cs95 Where is botspeed?
The thing I don't like when people change there names is comment threads getting confusing:
comment - cs95
who dat
@coldspeed, comment - otheruser
00:31
@ArtemisFowl here will be process:
@coldspeed blah blah - foobar
@foobar foo foo - cs95
Then everyones is Peas
@U9-Forward Wow I only knew cabbage and rhubarb
00:35
@ArtemisFowl Haha
That's laurel
@vaultah I want to make a code:
>>> 'laurel' == 'lol'
True
m8_
m8_
00:55
Got a late night question gang. I'm writing a script to compare percentages across two datasets. The percentages represent completeness of data. but the datasets are different sizes. Is there a process or value from a formula to normalize them?
I'm thinking of just taken the average of completeness
 
2 hours later…
02:43
hi guys
its my code
this is exception i got
anyone help me to resolve
 
3 hours later…
05:17
The problem is to find the maximum value of `|A_i-A_j|+|i-j|` where `A_i,A_j` are elements of an array.

I am stroting the `max` value in the array named `nums` and also `min` value. Then finding the indices where max and min value present in the array. As we are maximizing the required value, we need maximum index of maximum value and minimum index of minimum value. So here is the code:
t=int(input())
for _ in range(t):
    n= int(input())
    nums= list(map(int,input().split()))
    maxx= max(nums)
    minn= min(nums)
    indices_maxx= [i for i,x in enumerate(nums) if x==maxx]
    print("Indices of max:",indices_maxx)
    indices_minn= [i for i,x in enumerate(nums) if x==minn]
    print("Indices of min:",indices_minn)
    max_ind= max(indices_maxx)
    print("Max index of max value:",max_ind)
    min_ind= min(indices_minn)
    print("Min index of min value:",min_ind)
    result= (maxx-minn)+(max_ind-min_ind)
Can anyone tell me where I'm going wrong? The online judge showing that answer is wrong
You don't want to take the maximum j and the minimum i... You want to take the j and the i that are furthest apart. Maybe the distance between the minimum j and the maximum i is larger.
There's also no guarantee that A_i will always be the maximum of all values and A_j will always be the minimum.
[1,1,1,1,1,1,1,1,1,0,9,8,8,8,8,8,8,8] <- the solution is 8-1 + 17-0, not 9-0 + 10-9
@Aran-Fey Got it, thanks :)
05:57
cbg
06:09
cbg
06:34
Ugh, so many questions flying around here...
user7437554
Hi guys! Im writing this code just for fun and to learn something:
user7437554
#draw fancy molecules
from rdkit import Chem
from rdkit.Chem import Draw
from matplotlib.colors import ColorConverter
cacho=Chem.MolFromSmarts('[CX3]=[OX1]')
peptide=Chem.MolFromMolFile('peptide.mol')

cacholist=[]
for match in peptide.GetSubstructMatches(cacho) :
  cacholist.append(match)
print(cacholist)

flat_list = []
for sublist in cacholist:
    for item in sublist:
        flat_list.append(item)
print(flat_list)
m=Draw.MolToImage(peptide, size=(500,500), highlightAtoms=flat_list, highlightColor=ColorConverter().to_rgb('aqua'))
user7437554
It is a funtion which colors atoms in molecules, but I would like to make it possible for people to introduce both the smarts string ('[CX3]=[OX1]') and the color 'aqua'
user7437554
from terminal, i mean without open the script
user7437554
I know there is something called subprocess. But do you think that's the right approach?
user7437554
06:39
(I dont understand very well how to use subprocess.popen etc)
06:50
I think you're looking for sys.argv
user7437554
@Aran-Fey uhmm I'm reading and its quite right but...
user7437554
I don't see any good example
user7437554
I'd like somebody to run:
user7437554
python scriptname.py 'smartatoms', 'colorstring'
user7437554
and pass those arguments into some functions on the script
user7437554
07:03
Oh, I got it. Thanks @Aran-Fey
08:02
We have n elements from an array, and we need to find the i,j indices for which we have minimum value of lcm(a[i],a[j]). What can I do except just using two loops and checking every possible pairs and printing the i,j related to the least value of them?
for the bruteforce approach, you can make sure you dont check the same pair twice by modifying the start point of the inner loop.
Yeah I have implemented that, then also it's a O(n^2)` algo
after that is done, you can explore some optimization along eliminating some numbers for checking
oh yes, i dont foresee the order going down.
@ParitoshSingh Actually, n can be of 1e9 order.. So, we need a O(n) algo
hmm
is it minimum lcm for sure or maximum?
08:13
Minimum
It's from Codeforces yesterday's contest
@ParitoshSingh I think both will be nearly same algo
im guessing, thought i cant yet reason out why, that the lcm upto N digits, and lcm upto N+1 digit, would only require checking the N+1th digit with the pairs making up the lcm.
(which probably means i could be wrong too)
08:28
Input
5
2 4 8 3 6

Output
1 2
wat
how is the LCM of (4,8) smaller than that of (3,6)?
oh, it's 1-indexed :/
i wish these sites could just let me submit without making an account and doing a bazillion things
I wish they'd ask for the 2 numbers as output, not their frickin' indices
@Aran-Fey By 1 2 they mean 0 1
Means, if you get i j th index where the number belongs to, then you need to print i+1 j+1 as answer
09:10
@Aran is this still the same problem I think I saw being talked about yesterday?
I have no clue, I wasn't paying much attention to chat yesterday
chat be like: that's hurtful @Aran-Fey
@cs95 I see you got bored of all those other pesky letters in your name?
shame, i liked coldspeed
@Paritosh the coldspeed is dead... long live cs95!
09:16
sheds a single tear
πŸ––
coldspeed ? eh kinda remember he answered one of my question sometime ago ;)
I have dealt with many a user named skyline in my time, so pardon if I don't place you immediately
The name's Skyline, Nissan Skyline :p
@cs95 As far as I know, "chat" isn't a person so I'd be surprised if I hurt its feelings. If we're talking about "Chad" on the other hand... I'd still be surprised because I don't know any Chads
09:27
Cabbage
isn't Chad a country? :p
cbg @PM2
@taritgoswami We're happy to help you, but to get value from these contests, you really need to do the bulk of the work yourself. So when you get stuck it would be better if you just come here with a simple focussed question and a MCVE, not the full contest problem. And that MCVE should be totally self-contained, with no input() calls. Thanks.
Chad could refer to the country, a person named Chad, or a person deserving of being called "a chad"
what is apparently not a nice thing
hey guys I'm blocked in a problem do someone can help me?

I have a blacklist of word that I want to be replaced in all occurrences of a dict. replace function iterate through the dict and find occurrences and replace words with the change.

import re

blacklist = ['test', 'bo']
change = '______________'

data = {'username': 'bo', 'avatar_url': 'https://www.gstatic.com/webp/gallery3/2.png', 'embeds': [
{'fields': [{'value': 'test', 'name': 'test', 'inline': True}], 'timestamp': '2019-04-17T09:12:33.301755+00:00',
Besides, some people consider it cheating to get any help with contest code. We're not that strict, but at the same time we want your rank on the contest sites to reflect your coding skills, not ours. ;)
09:35
@Aran-Fey you just hurt this little guy's feelings
@PM2 or as it turns out from yesterday to even ask a site like SO for some help at all :p
@JonClements Skyline R33 my fav car.. legend :P
When did companies start offering to drive food out to customers?
Back in the days of punch cards, chad fights were not uncommon. Getting a handful of chads out of your hair wasn't easy. :) I guess they're like confetti, but more persistent.
@Bjango People have been home-delivering food since before the invention of the automobile.
09:48
Seriously?
Ref: Little Red Riding Hood. :)
@Bjango Sure. But it worked differently, before phones were invented (or common). You'd make prior arrangements with a restaurant, and they'd send the food around at the agreed date & time. Of course, it's often more practical for caterers to prepare & serve the food on-site.
cbg
does anyone know ICU996 here?
10:08
@FrankAK Do you mean this? iq.opengenus.org/icu-996
Yeah, It's really funny, I have started it on github.
@PM2Ring I have a question about English grammar. Of course it's Python chat room. But just hope you can help :)
Can I said "Back to a programmer" or "Back to become a programmer" or "become a programmer back"? which one is correct?
@FrankAK I'm not sure what you're trying to communicate. Possibly "Back to being a programmer".
For example, I haven't coding for a while, may be I got another job to do. but I am going to do development job again. so I want to know how describe this.
"back to programming" might be better suited perhaps.
sounds natural to me, though disclaimer, english isnt my first language.
back to development, might convey the job aspect of it better.
@FrankAK Funny? It sounds downright evil to me. Unless it is truly voluntary, and the workers are getting excellent overtime payments, special privileges, like free snacks. And can stop doing 996 shifts when they choose. OTOH, plenty of self-employed coders & small teams do that kind of thing in short bursts, when they need to make a deadline. Or impress a potential big client.
10:20
yikes, that's a real thing?
Yeah, but we couldn't control the situation. We are definitely not a robot, but the boss try to make us more efficient, just like what we did on our program, our process (i.e concurrecy, async io...., poll)
@ParitoshSingh Looks like it. I'd never heard of it before. en.wikipedia.org/wiki/996_working_hour_system
no good ever comes out of pushing people to work in frankly unacceptable work hours in the long run
i suppose it only works because the organizations can be cold hearted and "consume" people as if they were resources, and replace while the resources last.
country like china, i suppose they wont see the downsides from the organization standpoint for a very long time.
"oh, dead employee? meh, lets get another."
Yeah, That's why I try to work at Australia, but I am not sure if it easily to get the job at Melbourne.
It's very popular to work like 996 in China.
on a company by company basis, you could argue for productivity drop in terms of fatigue etc perhaps
appeal to the humans who still remember being human in the management
frankly, i blame the people for doing such a thing too
10:32
@ParitoshSingh we're talking exactly about China
i just... shakes head in disbelief
workers are dispensable
i am happy for people in china who manage to escape.
some of the most brilliant and talented people i've seen came from China. and will never go back.
@ParitoshSingh Where are you from?
im from India.
10:34
Yeah. But you need to be very good to be able to leave.
And then your family is still a hostage
Cool! I was thinking it's the same in India.
Sam
Sam
@AndrasDeak Turned out to be inconsistent JSON happening way up in the pipeline :( The hashing was deterministic all along. Although i learned the built in hash() adds a small salt
@Sam neat
@FrankAK I don't know how hard it would be for you to get developer work in Australia. But you can improve your chances by improving your English.
@AndrasDeak We do also need to improve english skills. very difficult to reach that ..
10:36
definitely not. Most places dont have overtime here. people still are "overworked" but thats more along the lines of 10 hour work days instead of the standard 9 at times.
we dont kill our people to get things done though. not like this.
Sam
Sam
@AndrasDeak Damn unordered sets
@PM2Ring Thank you sir, I am trying. I have finished an IELTS test, but only 5 scores.
@Sam just like dicts, that's why I said str(dct) is a code smell
you like reading something? novels, stories, fiction/non fiction? @FrankAK perhaps find something that lets you consume english without focusing on learning it
@ParitoshSingh only satellites ._.
10:38
it helped me learn english atleast
Cbg,
I have millions of HTML files from which hrefs have to be parsed. There will also be conditional filtering later.

I'm keen to use generators and filter() here but struggling.
Can anyone point me in right direction?

Here's what I've tried so far
https://gist.github.com/mayurbhangale/d4c1983e86fc76357515772ab5630147
@MayurBhangale BeautifulSoup might help
im scared to click the link. will i find regex? :P (remembers a flash, a vague memory of tony the pony
I have subscribe some channel like (medium.com), haven't try to read novels yet. Don't know which book suitable me. BTW, I try to improve my speaking by watch youtube online course.
Using Selectolax because found BeautifulSoup to be really slow
10:40
OK
@FrankAK Good luck, Frank. You don't need great English to live & work in Australia. But we already have plenty of Chinese people here, and many of them have excellent English skills, so you'd be competing against them. ;)
@AndrasDeak How would you recommend doing filter() in this case? Can you suggest improvements from linked gist?
No, I have only very cursory experience with parsing html and it was with bs4
@PM2Ring Oh, really! Is that because they born in Australia? I plan to go to Melbourne before Dec this year. but I can only stay for one year.
umm... I hadn't heard of selectolax or the "Modest" project... will make a note to have a play with that at some point... it certainly talks the talk...
10:44
@PM2Ring Thank you anyway! If I got a good job in your country, I treat your lunch :P
@Mayur umm... do you really mean to have yield in extract - it really looks like you should be just returning stead... unless you want to be building a list of generators...
@FrankAK Some were born here, most are immigrants. And some Australians with Chinese ancestry are descendants of miners who came here in the gold "rush" in the 1800s.
@FrankAK Thanks, but I live in Sydney. Melbourne is a long way to go for lunch. :)
@JonClements The problem: I have millions of files to read, parse and filter. list comprehension takes up significant RAM
Most rich man would like to immigrant to your country, they don't want to pay tax to chinese's GOV
@Mayur if we start here: html_paths = (file for file in glob.glob('rawpages/'+"*.html")) - making a generator expression there is a little pointless as glob.glob returns a list - so you're just adding overhead anyway... You're probably after: html_paths = glob.iglob('rawpages/*.html') which reads more easily and can be iterated over like you're trying to do anyway.
10:51
@PM2Ring Ah, Everything is too expensive in Sydney, I can't even live if I have got a good job. That's why I decide to got Melbourne at first. of course I will visit Sydney for trips.. :)
@JonClements Missed that! Updating code. Anything you can suggest on filter part?
@Mayur also, yielding in extract really isn't beneficial - you're not saving RAM - in fact - you're probably using more of it as all those extract's on the yield have to keep the dom and hrefs somewhere for when you eventually decided to take the yielded value...
@FrankAK Yes. Housing is very expensive here in Sydney, compared to the rest of the country. But wintertime in Melbourne is too cold for me.
@JonClements How do I properly yield here?
@Mayur you don't yield - you return
10:55
the generator part should only be with respect to handling one file each
i.e. iglob that Jon mentioned
Your issue is not that the HTML files themselves are large, but rather than there's too many of them.
Thanks!

Can I simulate same behaviour with filter()?
What do you intend to do with all these hrefs? You have hrefs = [] which you're appending information to each time - is it your end goal to actually end up with a massive list - or could you not just write it to a file/simple sqlite3 db?
I have to filter all hrefs which contains word about
What are you referring to by filter()... I think you're over complicating this at the moment and your use of terminology I think is a little misleading at the moment.
@Mayur in your extract you've got conditions in the href extraction... just add another and clause to your list-comp ?
Thanks. I was wondering if this can be done in better way
10:59
You don't need filter.... where you've got hrefs = [tag.attributes['href'] for tag in dom.tags('a') if 'href' in tag.attributes] - make it something like hrefs = [tag.attributes['href'] for tag in dom.tags('a') if 'href' in tag.attributes and 'about' in tag.attributes['href'].lower()]
@JonClements Thanks Jon!
Another option... slightly more complicated... is you could use scrapy and give it file://path/to/your/file as it's input urls, then yield from a LinkExtractor telling it to filter on hrefs only containing "about", then run that, and it'll automatically kick of N many parsing jobs, can output to CSV format for you and generate logs of progress/success etc...
(however - that being said - if you try those changes and go for what you've got - it should be fine... even if you have to be patient :p)
11:18
BTW, @MayurBhangale we use stars in this room to highlight posts of general interest, especially funny ones. We don't normally use stars to mark replies that are only useful to the person being replied to. It's not a big deal, but now you know for next time.
@PM2Ring Here since year :) Didn't star. Now clicked ONLY to recheck if I did ;)
@MayurBhangale Sorry, I assumed it was you starring Jon's replies.
 
2 hours later…
13:21
cabbage
13:38
cbg
Busy day in here ;)
13:58
cbg
:waves: to the 3 amigos from PyTexas.
Lip balm?
@PM2 great... now I've got that film going around my head :)
Ha! Took me a sec Martin Short's canteen being filled with dirt is hilarious, filming that must have sucked for him
@JonClements You say that like it's a bad thing. :D There's a plethora of worse films to get stuck in your head. ;)
14:14
TIL canteen means more than a cafeteria...
@AndrasDeak It's also a charity. canteen.org.au
Ironic that an Australian website needs so much data transfer to load ;)
Sam
Sam
Can I install a pip module via python itself?
I have this right now:
`if not "termcolor" in sys.modules:
print("Installing termcolor via pip. . .");`
But how do I install it?
Is there any other way than use a command via python
> As noted previously, pip is a command line program. While it is implemented in Python, and so is available from your Python code via import pip, you must not use pip’s internal APIs in this way. There are a number of reasons for this:
Sam
Sam
so the conclusion is..?
just use pips api i guess?
14:28
@AndrasDeak It is. Plenty of people here are on fibre optic broadband, and have unlimited data so they can watch Netflix, etc. But plenty of us have fairly limited data allowances, especially outside the big cities.
@Sam I'm not an expert but pip itself says don't use it from inside python unless via subprocess and friends
Sam
Sam
os.system("pip install")?
@Sam If by "api" you mean "through subprocess() like you were invoking it from the command line" then yes.
@Sam how about reading the link I posted?
I know that sucks, but sometimes you just have to do something on your own rather than waiting for others to hand you complete solutions
@Sam We don't want Python to turn into NPM. We prefer users to explicitly install stuff, and don't like scripts to install their dependencies behind the user's back.
If you're actually writing the installer for your package, that's different. But it should still tell the user what's going on.
Sam
Sam
14:36
Will do :D
Isnt NPM just for node.js?
I think it is for any JavaScript, hence its plethora of packages
hi guys !
is there a way to know the dateformat of a given string ?
probably not
Trial and error, mostly - plus the ambiguity of MDY vs DMY always makes this exciting
also YMD in some parts
14:48
@HarvesterHaidar The best way is to ask the person who's sending you the data. Their are libraries that can guess, but any algorithmic approach needs several date sample strings, to eliminate the ambiguity.
thank you very much !
i have date coming from a csv file as strings , i need some way to get the current format of the converted date , something like
date = parser.parse(string_date).getformat
There are some add-on packages that may do some of this trial-and-error for you, but just looking at the string "1/3/2019" could just as easily by Jan 3 or Mar 1. You should also find out if you are dealing with UTC or local times, and if local times, just what is meant by "local".
I think "arrow" is a popular add-on timestamp package - I've never used it myself tho
what i want to do is to iterate all over the datetime column and see which is the most common format then apply all the possible ones to it
i tried using datefinder , dateutil , parser , but no one has " get current format of a given date " so i can count it through
Or if you have many strings to look at, and if they are presumably all the same format, then you could rule out something like MDY if you see something like "28/2/2019"
15:04
consider this list of dates
2/3/00
13/4/2000
1/31/99
20/3/2000
i want to check which is the most common format i have which is %d %m %Y ,
then i try to apply to the whole list and if it doesn't fit i want it to be a string of null ,
just to get the case of when the date and month are less than 12 , they cab be applied either to %d %m %Y or %m %d %Y depends on which is the more common format in the list
"they can be applied either to %d %m %Y or %m %d %Y depends on which is the more common format in the list" - this kind of guesswork will most assuredly give you some incorrect data points
cbg-ning
would it be possible to take a format let's say '%d %m %y ' and search through each item of the list , if it can be applied then print it , if not then print null ?
Why would it not?
Yes - such a thing is possible
15:16
@PaulMcG aliens!
because if '%d %m %y ' format is the most common I don't want a date like 2/29/99
to be switched to 29/2/99 i want it to be a string "null"
@HarvesterHaidar Is this your first Python program?
it's my first project in python , i program on other langs
Presuming your data set is evenly distributed, you could take the number of items from the first column that is greater than 12, compare it to the number greater than 12 in the second column, and whichever is greater, use that as the day column? That would also be a criteria by which to exclude and print null.
1/1/19, 1/2/19, 2/1/19 are going to be impossible for you to guess from either way though.
@toonarmycaptain i tried that but i had a problem with the separators the data has so many different separators
15:20
...although if you've got clumps of similarly formatted dates, you could do some inferences eg for 28/2/13, 1/1/10, 14/7/19 you could infer 1/1/19 is the same format as the others.
@HarvesterHaidar ...clean the data first to make the seps uniform? I assume single space,/,- are more or less what you're dealing with. No spaces eg 1211 for 1/2/11 will be harder, but since it seems like you're ok with invalidating some data to begin with, maybe not a deal breaker?
Something like this:
def split_date(datestring):
    for sep in "/- ":
        if sep in datestring:
            return datestring.split(sep)
    return "???"
@PaulMcG "how come I only get the first separator?"
Untested - did I botch that?
@PaulMcG i will try this and see if i have the result of the following scenario
30/5/99
5/30/1999
5/29/1999
5/29/99

a lable saying "your most common format is %d/%m/%Y"
then the list will be
null
5/30/1999
5/29/1999
null
...or you could replace the sep with one you prefer, depending on what you need to pass the strings to.
15:31
@AndrasDeak I think that works...
In[3]: split_date("1/1/2000")
Out[3]: ['1', '1', '2000']
In[4]: split_date("1-1-2000")
Out[4]: ['1', '1', '2000']
In[5]: split_date("1 1 2000")
Out[5]: ['1', '1', '2000']
In[6]: split_date("1.1.2000")
Out[6]: '???'
I mean if there are multiple kinds of separators in the string :P
Haven't seen any such examples yet in this discussion, and such a date is probably in the gigo camp
now you know how much of a huge help you guys are :)
15:35
But that method wouldn't flag them as such, but would return a partially split string
wim
wim
^ CPython 2.7 branch! 😳
@AndrasDeak I personally would simply discard those.
@wim Use automerge!
how could i do something like
dd_mm_yyyy = 0
mm_dd_yy = 0


for given_date in all_dates:
converted = parser.parse(given_date)
if converted.getformat == "%d %m%y ":
dd_mm_yyyy +=1
elif converted.getformat == "%m %d %Y":
## and so on ..
please see the pinned message for formatting multiline code in chat
15:46
@AndrasDeak sure thank you
@HarvesterHaidar 1) create a list of possible formats that you wish to test for 2) write a function that determines whether a string value matches a particular format 3) iterate over your string values, tallying which formats match the most strings (collections.Counter might be helpful for this) (Details of 1, 2, and 3 are left as an exercise for the reader)
thank you very much for your help all ,
working on that right away !
wim
wim
16:02
@HarvesterHaidar not in general. it's ambiguous.
Sam
Sam
Off topic but any Kubernetes users can help me; kubectl create deployment hello-node --image=gcr.io/hello-minikube-zero-install/hello-node pulls a docker image from a cloud service but was wondering if my images can come from a local offline source?
wim
wim
# Python 3.4.9 (default, Mar  7 2019, 23:00:12)
>>> (*(1,2), *(3,4))
  File "<stdin>", line 1
SyntaxError: can use starred expression only as assignment target
weird syntax error message
why the thing about assignment?!
That is legit in 3.5.2
wim
wim
very hairy problem
01/02/2001 - is 1 feb or 2 jan? need some regional context about the source data, or more data points
Why do we associate having lots of hair is difficult and/or scary? Are hairy people offended?
3
16:14
@wim thank you !
Date parsing is the bane of every programmer
@piRSquared Just misunderstood youtube.com/watch?v=f2ajHEdsdU4
@piRSquared I don't try to be difficult, I promise...
@toonarmycaptain you don't have to try. it's in your nature.
@piRSquared Shhhh ;)
16:30
😢🀐
Is anyone in this room looking forward to Good Omens' May 31st release?
I will occasionally sit and watch a movie but usually my attention span will not allow for TV
I'm looking forward to the next episode of Game of Thrones
^
Theme music has been running through my head all morning
16:48
no spoilers here
haha, better safe than sorry approach Andras? ;)
hey, i have a df containing rows with strings, i applied a re.sub on the column to remove some words, after applying i saw some strings were starting with spaces (which i thought), so i tried strip but still no change, can any body help me here
@iamklaus I need an example
@ParitoshSingh yup
How did you try to apply strip?
16:53
ya sure, i'll upload a sample..
i was trying to answer this ques on so... stackoverflow.com/questions/55732018/…
@roganjosh hey i posted the link for you to see
Docs for numpy.loadtxt() says there is a max_rows kwarg. But IntelliJ complains about an unexpected argument. Anyone know why?
"cats have cute toe beans"? Anyway :P
> New in version 1.16.0.
@AndrasDeak yup, I see that now. Thanks
Guess I'm updating numpy for this project
it's a good thing that I can make arbitrary decisions like that for this project...
@piRSquared hey i posted the link,, thanks
16:59
@piRSquared I've been jamming out the soundtracks on a regular basis for most of the last year
makes for great coding music
@Dodge It's like 6 eps, I think, so pretty much a long movie ;)
@iamklaus ...
s.str.replace('|'.join(strings_2_remove), '').str.replace('(?!\.)  ', ' ')
First regex replaces the things in strings_2_remove the second replaces double spaces with single ones so long as it doesn't begin with a period
@piRSquared hey thanks for the reply, same output, chris who also answered on the post says that its related to pandas default display settings.
@toonarmycaptain that's not too bad, might be worth checking out in that case
@Dodge Have you read the novel?
17:11
No, anything I've read lately is just non-fiction
@Dodge Ah. Well, it's worthwhile. I'm debating a reread before the miniseries. One of those...do I want to appreciate it more because the book is fresh in my mind, or do I want to enjoy it less because the book is fresh in my mind?
wim
wim
@piRSquared might be a topological thing. hairy being the opposite of "spherical and in a vacuum".
17:35
Hi guys
Can someone explain me this problem? codeforces.com/problemset/problem/136/A
What are we supposed to be explaining exactly?
I am unable to understand the question
let me just say i dont blame you
:D
17:45
I don't understand the problem. Whatever that context was supposed to help with, I don't follow it sorry
"the i-th number is pi β€” the number of a friend who gave a gift to friend number i" I cannot translate this to change 2 3 4 1 to 4 1 2 3
Wait, yes I can
\o
Can you please explain?@roganjosh
I'm working on it
17:54
Petya is a weird kid
what happened to just wanting to play smash brothers
wow it's been a while since I've been around.
n = 4
p = [2, 3, 4, 1]

new_list = [0 for item in p] # or in range(len(n))

replacements = {p[item -1]: item for item in p}

for index, value in replacements.items():
    new_list[index-1] = value

print(new_list)
In p the first value is 2. So you want the 2 index of p to be there - in this case 4
The description of the problem is, frankly, garbage
00:00 - 18:0018:00 - 00:00

« first day (3105 days earlier)      last day (2066 days later) »