« first day (3738 days earlier)      last day (1211 days later) » 

12:58 AM
Errors were encountered while processing:
 set
E: Sub-process /usr/bin/dpkg returned an error code (1)
Does anyone know what this set **** is and how to fix it?
 
@UrosTadic please edit out the expletive from that message
thanks
@UrosTadic we'll need more context. Like, what is raising that error? And how is it related to python?
 
Its related to apt, i get the error whenever I try to install new package on ubuntu
Which room is better for the question?
 
So it's not a python problem. It's an apt/ubuntu problem.
 
I couldn't find ubuntu room
 
@UrosTadic something on chat.stackexchange.com. A chatroom for ask ubuntu or superuser or unix&linux perhaps
 
 
1 hour later…
2:30 AM
cabbage
What is the next step after a week has passed since a flag was raised and there were no response from the mods?
 
 
3 hours later…
5:18 AM
hello, does anyone know how i can find and remove the middle digit of a number?
 
What if there is no middle digit?
 
uhm actually the problem given to us is to remove the middle digit of an odd number, and to remove the two middle digits of an even number
i mean a number that has an odd number of digits (ex. 123) and even number of digits (ex. 1234)
 
again, you have cases like single digit & 2 digit numbers that are still special cases as per Aran's query.
 
i guess if it's a single digit, then there's no output?
*a single or 2 digit numbers
 
So do you know how to take the first x characters of a string? And how to take the last x characters of a string? And how to find the length of the string?
 
5:25 AM
i already have a code for determining whether the number or digits is odd or even, but yeah idk how to make a code to find and remove the middle digit/two middle digits of a number
uhhh i dont know how to find the first and last characters for a string, but i know how to find the length
am i supposed to convert the int to a string?
 
That is by far the easiest way to solve the problem, so yeah
 
but how do i find the middle digit tho
 
I'm sure you can figure out how to extract a specific character from a string if you put your mind to it and spend 5 minutes on google
 
hmmm im not gonna extract it tho, im supposed to remove it from the integer. so for ex. 12345, since the number of digits is odd, my output should be 1245. for ex. 1234, since number of digits is even, my output should be 14
 
I'm sure you can figure out how to delete a character, too.
 
5:40 AM
@starshine so, like Aran said, you could just make it a string and work with that, since dealing with integers will be more complicated.
 
 
5 hours later…
10:12 AM
Hi! Last conversation was interesting. One person asked a question. Another just reply: 'you can figure it out"... I am sure first person left very satisfied..
 
Okay, next time I'll just say "google it"
It's not like I didn't help. I told them to work with strings instead of integers. I'm not interested in being anyone's personal tutor, so I told them to figure out how to work with strings. If they still have problems, they're welcome to ask for help again.
Essentially, I help people figure out problems, but I'm not a replacement for google or a tutorial.
 
10:52 AM
@ReblochonMasque wait 4 more weeks until the flag is handled
@deal2k I'm sure there are professors, TAs and textbooks where one person can learn to do their homework without being spoon-fed. They got adequate help.
@ReblochonMasque presumably you know about stackoverflow.com/users/flag-summary/current where you can monitor progress
 
11:53 AM
cbg
4 weeks!? Seriously, 4 weeks? ok.
Yes, I know that place.
Thanks for your reply @AndrasDeak, appreciated.
 
I mean, it would put you right in the sweet spot of the 4-6 week window :)
 
@ReblochonMasque worst case, these days. Probably less. But 1 week is a rookie number. Gotta pump that number up.
 
Oh wait, it's 6-8 weeks. I can't even meme today apparently
 
12:22 PM
@ReblochonMasque having had a quick look at the flag you raised - I think it's being looked in to - what you raised isn't straight-forward and sometimes mods don't clear the flag either way until a conclusion is reached - I wouldn't worry about it
 
12:32 PM
@ReblochonMasque okay... I've cleared that flag... please use here to see the response.
 
 
1 hour later…
1:59 PM
Thanks @JonClements, appreciate you looking into it, and responding.
I see what you did @AndrasDeak @roganjosh O_o
 
Oh, please don't implicate Andras in my mishandling of the meme. That brain fart was all mine :P
 
@ReblochonMasque watermelon :)
 
2:58 PM
can you split a string using a lambda function
i need to split a string if the letter isnt an a or b
 
Hi. Is there somewhere I could ask about a python ML module ?
It's sort of a coding question
 
@Trajan so you want to split on all as and bs?
 
if its not an a or b split there @MisterMiyagi
so 'abababcdbabdba' would be ['ababab', 'bab', 'ba']
 
I would use re.split for that
as in re.split(r"[^ab]", "abababcdbabdba"). Note that this may include empty substrings as well.
 
@MisterMiyagi thanks
say you had something like 'bbaaabab'. what is the best way to remove all the 'ba' s before you remove the 'ab' s?
simulation is tricky and probably inefficient
 
3:23 PM
@Anush what do you mean by "sort of"?
 
@Trajan well, I recommend to literally remove the bas before removing the abs.
'bbaaabab'.replace('ba', '').replace('ab', '')
 
@MisterMiyagi i think its inefficient
 
I think having to do that kind of operation means you are well past worrying about inefficient.
either way, it's O(n). That's pretty good.
 
bbaa -> ba which can be reduced again to '' which your method doesnt cover
 
surely you meant to say "which the description did not cover"
 
3:28 PM
yes agreed
 
either way, none of that seems like something you should be doing in the first place.
if you have to do that in some critical section, I recommend to reconsider your approach and try to clean up the data before processing it.
 
3:56 PM
@MisterMiyagi sounds like a coding challenge. Especially in quick succession after a similar problem.
 
@AndrasDeak in that case, I also recommend to reconsider the approach.
 
4:43 PM
hi
can i ask something?
 
@박종준 you may want to check the room rules if this is your first visit, but in general "yes". Just ask ahead, don't ask to ask.
 
@MisterMiyagi I'd omit the second half, but yeah
people tend to just read "yes" and then post their fresh question here
 
5:02 PM
I promise to be back to my usual grumpy self by middle of next week. holidays did not do me any good...
Nothing a hefty dose of SO main cannot fix. :D
 
5:52 PM
@MisterMiyagi main is the shadowy place. You must never go there, MisterMiyagi
 
 
1 hour later…
7:04 PM
Hi guys, is there anyway to index a list comparing a number? lst[>1]. All index positions greater than 1 will be returned
 
@CoolCloud if you really mean index, then you need a slice, lst[2:]
 
@AndrasDeak omg. what was i thinking....
No idea why it did not come to me at first
 
7:29 PM
We all miss things from time to time
 
Hmmmm you are right, thanks :)
 
8:22 PM
Hi again, anyone know which time format this is ? '2020-02-29T18:21:33Z' ?
 
@CoolCloud seems to be ISO-8601 with timezone info, at least dateutil.parse.isoparse accepts it (datetime.fromisoformat does not)
 
So the only way is by installing an external module?
 
that seems to be a different question from "what format is this?"
>>> datetime.datetime.strptime('2020-02-29T18:21:33Z', '%Y-%m-%dT%H:%M:%S%z')
datetime.datetime(2020, 2, 29, 18, 21, 33, tzinfo=datetime.timezone.utc)
I don't know if it can break on non-UTC strings. I'm not very familiar with datetime intricacies.
 
8:39 PM
using datetime does work. And I guess the API always gives in UTC
 
 
1 hour later…
9:43 PM
Hello!
 
Hello :)
 
I decided to keep my Winter Bash hat ;)
 

« first day (3738 days earlier)      last day (1211 days later) »