« first day (3341 days earlier)      last day (1598 days later) » 
00:00 - 21:0021:00 - 23:00

12:00 AM
@user11964604 By 'compare' do you mean 'compare visually', or a statistical test on the distributions?
@cs95: I also tried to clean up Multiple aggregations of the same column using pandas GroupBy.agg() for clarity. Looks pretty good now.
 
 
3 hours later…
3:28 AM
@Dodge Without knowing what's causing it to stop, can you just hit run again, if you know what the next input to A might be, without giving it the phase inputs again? I can give you the hint that was breaking mine if you like?
 
@toonarmycaptain It was stopping as it should, Kieran was able to take a look and pointed out that I was not preserving the first round of amplification when I "primed" the system.
 
@Dodge Ah. I was passing the same list into each Amp/IntComp, so each one was making mods to the master rather than their own. A little [:] fixed it. Only took me a few hours lol.
 
4:02 AM
@smci That question was fine. The main problem was that the random code wasn't seeded so the answers could not be reproduced. I fixed that earlier today.
 
 
1 hour later…
5:12 AM
I have a python program running called main_account.py and on javascript side im trying to detect if its running but the problem is when i type ps aux, all i get are 2 processes (bash, ps) and on windows side when i type tasklist i do indeed detect python program running but it doesn't say its name main_account.py, it only says python.

1) How can I get it to be detected in ps aux? (im using windows 10 bash)
2) If not, then how can i make it show its real name in tasklist? (instead of just showing python.exe)
The thing is, i start the process with command python main_account.py
Python being added to environment variables of my windows.

If i try doing it with /usr/bin/python3 then it says no such file. So maybe this is the fix? I should fix this and run program with /usr/bin/python3 instead from windows.
Thiis is why windows is trash for development
idk what im talking about, i need help pls
 
5:39 AM
That was quite the part two.
 
@KieranMoynihan and I have deep respect for those who got it done so quickly. I'm not working on it tonight but I read over it and plan to implement a function for rendering the parameters.
 
wim
6:12 AM
@KieranMoynihan Was it?
 
wim
ah :)
 
7:12 AM
cbg
 
7:31 AM
Hi there guys! :) Anyone online?
Just a quick question: Is there any major difference between the 2to3-script coming in Python 2.7, compared to the one in Python 3.x versions (if there even is one included)
 
@Matrix166 You may check for yourself -> python 2.7 2 to 3 lib & python 3.8 2 to 3 lib
But no, there isn't / shouldn't be any major differences (minor ones would primarily be due to documentation & other compatibility stuff)
 
Hmm, alright. I'll take a look, thanks!
 
 
1 hour later…
9:04 AM
fell out of top 100 for part 1, but made it to rank 99 in part 2 :0
since it was named IntCode, I guess some people only handled Ints and not Longs
 
9:19 AM
How's everyone? :D
 
 
1 hour later…
10:46 AM
Cbg all, bugrit.
 
11:11 AM
cbg
 
cbg
 
12:07 PM
I finally got my day7 part 2 right, really curious how others here solved it =)
 
@arne from 2017!? :p
 
oof, I just remember that one
I think I spent days on that puzzle, it was some assembly-like puzzle as well. In the end I showed it to a friend in frustration, they took like two minutes looking at it and said "kinda looks like a prime sieve, doesn't it?" and that was when I finally gave up
it was a prime sieve, of course
or maybe that was 2018.. I really hope I get to finish this year
 
cbg
I saw a winter bash icon on main...
 
12:29 PM
@KieranMoynihan for some reason I didn't see that message until I opened SO main. but yeah, printing that along with each each of their i/o led me to find the bug =)
 
12:41 PM
Ugh realpython.com/python-lambda . I just took a glance after this was asked about on main:
>>> (lambda x:
... (x % 2 and 'odd' or 'even'))(3)
'odd'
it also has nice confusion generation with things like "In some situations involving loops, the behavior of a Python lambda function as a closure may be counterintuitive. It requires understanding when free variables are bound in the context of a lambda. The following examples demonstrate the difference when using a regular function vs using a Python lambda."
pretending that late binding is the result of being a lambda rather than having a function definition inside the loop
And it's from last June. Is realpython.com known bad?
 
If you have the following list my_list = ['b', 'c', 'a', 'd'] and you want to sort this list, but ignore the letter d and keep it first, is it possible to this with the sorted function and using the keyargument? Something like sorted(mylist, key=lambda x: x != 'd')?
 
I'd use a tuple for sorting, first index is "is it a d?", second is the actual character
 
Because right now my solution is d = [letter for letter in my_list if letter == 'd'], rest = sorted([letter for letter in my_list if letter != 'd'])
 
something like sorted(mylist, key=lambda x: (x != 'd', x))
 
Thenfinal_list = d + rest
That's it! Thanks @AndrasDeak
 
12:45 PM
no problem
 
btw I was searching for this question, but couldn't find and im pretty sure it would be a duplicate. Can you find it anywhere? I want to bookmark it
Which came quite close, but not what I wanted
 
Well it's very specific, there might not be an exact dupe. But the fundamental logic is always the same. I'll try to look.
 
If there's none, I will post it as question.
 
I don't think you should, it doesn't really hold value
 
Alright then I won't.
 
12:48 PM
so it's basically a special case of sopython.com/canon/89/…
I'd be inclined to dupe that question you'd ask to stackoverflow.com/questions/5212870/…
 
@AndrasDeak no, I have linked a few of their articles in the past and usually found them to be really good
a bit sad to see this crap
 
@AndrasDeak this is cringe-worthy indeed. :/
a def declaration would behave exactly the same as a lambda if it would pull in its values via closures/globals
 
@AndrasDeak Hmm, the second link is not very informative if you ask me.
 
my last link is close enough and I can't find closer
 
12:54 PM
Oke makes sense. Thanks for the help
Just to be sure I understand this correctly: sorted(my_list, key=lambda x: (x != 'b', x)). It will first sort every element which is != b and then append everything == 'b' in the front of list?
Trying to understand the logic of the tuple
 
@Erfan for each character it assigns a 2-tuple (x != 'b', x) For 'b' this is (0, 'b'), for everything else it's (1, 'c') or whatever. And sorting by tuples workes lexicographically: first the first (zeroth) index gets sorted, then ties are broken according to the second index and so on.
so what happens is that characters for which x == 'b' is True get picked first, and the ties among the remaining characters is broken by the characters themselves. The 'b' characters at the front will be tied with respect to both items of the tuple, so they don't matter
 
I see, that clarify's it
Thank you
 
no problem
 
I think I already ready something about sorting by tuples, this is helpful.
 
1:03 PM
Funny how you can still learn something about stuff you though was quite trivial. Something like the sorted function.
 
Sam
1:14 PM
Hey guys, bit of a longshot question.. anyone here use Pycharm Pro and have experience connecting to remote intepreters? I'm trying to figure out if it is possible to connect my PyCharm into a GPU pod running on Kubernetes :)
 
1:24 PM
Sanity check: given s, is there a nicer way to implement s = "1 a;2 b;3 c"; d = {int(x.split()[0]): x.split()[1] for x in s.split(";")}?
I'm trying to avoid calling split() twice
There's {int((t:=x.split())[0]): t[1] for x in "1 a;2 b;3 c".split(";")} but it's hardly beautiful
 
:'=
 
d = {int(a): b for x in s.split(';') for a, b in [x.split()]}
cbg
 
d = {int(pair[0]): pair[1] for x in s.split(";") if (pair := x.split())}
 
1:43 PM
{int(x): y for x, y in map(str.split, s.split(";"))}
 
ohh
 
Robert Harvey banned from meta for a year. The ban hammers have started to go down.
 
1:58 PM
@Sam I do but I have not. Heck, I don't even bother to connect to my own interpreter most of the times :D
 
2:23 PM
alright so if question is bit harder nobody answers here
thats fine
 
Yep, it be like that sometimes
 
cbg all
 
2:39 PM
@TheGarrus what's the question?
 
on linux, you can just read the script name from /proc
that's what ps does as well
and ps allows to print it
but the real solution is to have the process write a pid file.
 
I'm not sure I understand the setup in the question. How many computers are in the system? One Unix and one Windows?
I'm guessing calling ps aux on the Unix box won't show you the processes running on the Windows box
 
cbg o/
 
Horrible solution: instead of using python.exe foo.py 1 2 3 to run your script, create a copy of python.exe, rename it to python_foo_dot_py_args_1_2_3.exe, and run that instead. Then you can easily determine the file name and command line arguments just by looking at the process' executable name.
 
2:48 PM
I'm suspecting some unix/windows split here, judging by ps aux only showing a few processes. So it's basically not the same machine.
 
@Kevin almost along the lines of that renaming a file ".jpg" to ".png" should obviously automatically convert the format for you :)
 
@Kevin aren't you one of those poor/brave souls using Windows? Is the Linux subsystem VM'ish or actually integrated with the Windows part?
 
Oh, if it's a Linux subsystem, then maybe there's only one box. OK.
Based on five minutes of googling, WSL is not a "full" VM, since you can manipulate file objects that live in Windows territory. Unclear to me whether you can manipulate processes. I'm guessing no, since such a feature would probably be well-advertised
 
3:09 PM
@TheGarrus I agree with Mister Miyagi: get the script to create (& delete) an ID file.
 
In Jupyter Notebook, how do I avoid the output of a cell gets "minimized" ?
 
Coworker: hey, you know that ancient crusty library that you've been trying to excise from our project? The one that you removed all explicit references to, through great effort? We can't build in Q/A because it says it can't find CrustyLibrary.dll.
Me: [internal screaming]
 
@SebastianNielsen hover on the left blank bit of the cell it should highlight - and then click on it and that'll expand the cell
 
Nice, thank you! It worked! :D
 
Sam
3:36 PM
@WayneWerner It's so frustrating trying to get access to a GPU. I hate the damn cloud
 
hats are back!!
 
3:54 PM
Oh good, I was worried they weren't having it this year.
 
So, I crashed my machine! It's been awhile. view spoiler
 
I see that winterbash2019.stackexchange.com has no visible entry for "received a star in chat". I wonder if they removed it because it prompted too much spammy solicitation. Or maybe it's still there, but as a secret hat.
If anyone wants to meet me in the sandbox to reward one another pointless stars, we can find out together.
Preliminary results: I have received no hats.
 
Side effect: The starboard is to my starboard. Now I just need a bottle of tawny to my port and I'm all set.
 
I'm actually not sure whether last year had a "got a star in chat any time during Winter Bash" hat, either. Maybe I misremember, and it was always "post a message in chat within ±12 hours of the UTC New Year’s begin that gets starred"
 
4:10 PM
@inspectorG4dget frustratingly - I got I think 3 gold badges and a dozen or so silver over the last few weeks... now if only voters could have waited a little bit... they could have just waited, ya know? :p
 
@JonClements how inconsiderate of the voterbase! :P
 
exactly! I mean, I can't exactly step down as a mod again and get 2 gold badges on meta anymore either! :p
 
could you flex your mod muscles and unvote/unbadge yourself? I could then upvote exactly those posts... completely coincidentally </sarcasm>
 
how can i run a gevent server in the background while my application does other things?
serve_forever blocks
 
use a second process
 
4:22 PM
@inspectorG4dget since I'm not a mod anymore and even if I were, the answer is obviously "no" :p
 
ah crud!
Yes, hence the closing sarcasm tag. Transcripts do a terrile job of recording vocal-tonal sarcasm
 
:)
how's the PHD life doing ya?
 
4:37 PM
good sir, I think you may have missed this message: chat.stackoverflow.com/transcript/6?m=47750407#47750407
 
Ahh... indeed I missed the later (or forgot about it) - good news then!
 
good news indeed!
I managed to come up with some interesting ideas at work, and I have a pretty supportive manager, so I'm quite happy. Plus, I live in NYC now, which is pretty great
 
living in cities is great... I lived in London for a bit... I think it's one of those things you have to do in life, but meh, me, I love my suburbs :)
 
5:00 PM
I have a conundrum...my solution for todays AoC passes all the tests, and the tests for previous days, but doesn't give me the right answer.
 
I have heard similar stories floating around, so you're not alone in that regard
 
@toonarmycaptain I can take a look at your solution if you like :)
 
@KieranMoynihan That would be amazing. spoiler, or not as it's broken...
 
5:17 PM
Let's see, I'll try it on my computer. It outputs 203, then 0, then terminates.
 
bbias
 
Fun coincidence -- that's exactly the output I got on my first draft for this problem
 
Ah! Python 3 exclusive formatting!
 
If the program outputs more than one value, then the nonzero numbers are the opcodes that didn't execute correctly. So I guess you should look at the input opcode, with the relative mode.
 
@KieranMoynihan That's a feature, not a bug. ;)
 
5:22 PM
@PM2Ring If you say so...
It's probably to ward off all us grungy 2.x users
 
@toonarmycaptain BTW, yield from some_iterable is nicer than doing yield in a for loop.
 
All 2.X interpreters will self-destruct in 22 days, so soon it won't be a problem any more
Incidentally I'd like to pat myself on the back for this prediction being exactly correct except s/referential/relative/:
Dec 5 at 20:57, by Kevin
Here's a couple examples. Basically my worry is that, since my code is currently hardcoded to assume all targets are in positional mode, it will be a pain in the butt to allow referential mode too.
It was a pain in the butt, thanks for asking
 
Monday cabbage
@Kevin Is there a third interpreter problem? I already did Day 2 and half of Day 5.
 
dont ask questions you don't want to know the answer to :P
 
lol, good point
but yah, I just glanced at Day 9. Guess I have to finish Day 5 before I start that one...
 
5:32 PM
Hmm, I don't think it's too much of a spoiler to describe the requirements of part one of a problem, right? In that case, yes, there's another intcode problem.
 
(but spoiler: cough that sinking feeling in your gut, is spot on)
 
problem requirements aren't spoilers...especially for part 1. Solutions are spoilers.
 
The good news is that day 9 part 1 claims that the additional requirements it imposes will give you a "complete Intcode computer", so perhaps this is the last one requiring substantial refactoring.
 
My Day 5, Part 2 solution isn't working yet ;-(
 
@Kevin THankyou :)
Fixed bug, same result :/ view spoiler
 
5:35 PM
Do we have a list of AOC repos somewhere?
 
There's still a chance that day 10 starts with "Santa comes to you with a proposal for Intcode++, which has fifteen more opcodes:"
 
If anyone is interested, mine is at github.com/codeguru42/aoc. I typically make branches to work on a given day and don't merge them into master until I finish both parts.
 
@Code-Apprentice Yes, at sopython.com/wiki/Advent_of_Code
 
cool, thanks
I added mine
 
@toonarmycaptain Maybe this small test case will help? view spoiler
 
5:44 PM
 
AOC..... /shakes_fist
Better late than never.
 
6:04 PM
Quite possibly. Luckily you don't lose much performance by coding defensively with that in mind.
 
Yam. Day 9 Part 2 - I give up.
 
in case you have enough of AOC riddles, I have a small one
# how to get around unreasonable dogs
class Foo:
    def __setattr__(self, name, value):
        raise TypeError("(•ˋ _ ˊ•) no touch, only throw.")

f = Foo()
# your one line of code here
print(f.bar)  # prints 'take stick', no exceptions.
 
Part two isn't a trick question or anything, so a compliant Intcode interpreter should produce the solution in a reasonable timeframe. I don't know if that's reassuring or not.
Either you're thinking "oh good, so I don't have to try to predict all of the ways that the puzzle writer might be trying to intentionally mislead me" or "oh no, but I already triple-checked that I adhere to every requirement given"
@Arne Underhanded solution: f = __import__("collections").namedtuple("FakeFoo", ["bar"])(bar="take stick")
 
6:19 PM
(•ˋ _ ˊ•)
 
_(:3」∠)_
 
I assumed there would be ways to get around it.. maybe adding an assert isinstance(f, Foo)
 
@Kevin You're right, I think, but I suppose inferring great relief and sarcasm via written text wasn't needed to solve it ;)
 
If f has to remain the same value, then one possible solution is view spoiler. I think there are a couple of cracks in the data model that you can take advantage of here.
 
D:
I got Kevin'd
While hunting for the spoiler obfuscation link even.
 
6:26 PM
as embarrassing as this is, that's no the solution I was thinking about
but it's quite valid, so you get the stick @Kevin
 
[I immediately throw it]
 
the dog appreciates, and adds slots for the next level
(didn't test that yet)
 
Maybe this is the intended solution, then?
 
bingo
 
Another thought: memoization. But I'm not sure it would be worth it, what with elements able to be modified?
 
6:28 PM
\o/ 🏆
 
I'd initially hoped to make the assignment part of the given input, so that the actual solution would have been this in order to enable it
but for some reason that wouldn't work, and I gotta rbrb and just post the puzzle already
 
I'm not sure what memoization would accomplish for an Intcode interpreter. If a computer's state changes to a state it's already been in, it will loop forever. If a program eventually halts, then it will never have the same state more than once.
All of the Intcode problems we've had so far halt, so memoization wouldn't have picked up any repeat states
Hmm, maybe I'm not being imaginative enough about what counts as "state"
 
6:44 PM
@Kevin I had one like that
 
wim
(possible day9 spoiler) gist.github.com/wimglenn/… <-- how can I simplify this line for extracting the modes?
 
I think I used strings
 
wim
I'm refactoring the IntComputer but having a brain fart here
I don't want to use string domain in emulation problems (too slow!!)
 
I figured
you could probably shift the power and skip the first floordiv
 
wim
.
 
6:52 PM
no, just view spoiler give or take
you could also use log10 but I bet that's much slower
 
wim
@AndrasDeak yep, that was it
good job
although I guess I may as well use range(2, nargs+1) now
oh, no I can't because that i is the the instruction pointer delta
 
Do the Python-x tags create any value?
if so, what's the use-case?
 
@wim yup
 
wim
they have about 22 days worth of value left in them.
 
@AaronHall they still distinguish old legacy posts
Most of them shouldn't be used, but that's another matter. Assuming they're used right they're useful.
 
6:57 PM
How do you know they're "used right?"
 
quoting : "For questions about Python programming that are specific to version 3+ of the language. Use the more generic [python] tag if your question is not version-specific."
 
(aside from "I know it when I see it" of course)
 
3.x is used right if you're asking about f-strings or walruses
 
Since we're keen on cutting cpu cycles at the moment, I wonder if there's any benefit to some kind of divmod-based approach, rather than doing all the arithmetic from scratch in every iteration
 
wim
IMO we should push hard for python-3.x to synonymize to python after december
 
6:58 PM
(Not tested)
 
@wim I think that suggestion or similar has come up already on meta
 
I didn't bother with this in my actual code because my modulo-riffic approach is fast enough, but it might be worth benchmarking
 
wim
@Kevin doubt it - function calls are expensive
 
last time was meta.stackoverflow.com/questions/390235/…, not much supported
 
@wim Shouldn't you be using range(1, nargs+1) anyway, to get the nargsth element?
 
6:59 PM
Python devs, please implement an operator form of divmod that doesn't incur function name lookup overhead
 
wim
besides, divmod was what I was optimizing away from --> github.com/wimglenn/advent-of-code-wim/blob/master/aoc_wim/…
@KieranMoynihan no. arg0 is "self"
 
also meta.stackoverflow.com/questions/365015/… for "meh" on a similar note
perhaps there's no coherent push along the lines of "what happens after EOL?"
I'd be wary though, there are several aspects to consider
 
I think the only value is - Is anyone searching by 3.x/2.x? if so, value. but I'm a little meh on it. I'm just annoyed when people tag 3.x and don't tag [Python]
 
Well that's just plain wrong.
but that isn't the tag's fault
 
wim
Martijn should put his opinion (that it should not be synonimized) into an answer so that I can downvote it
Comments on meta do not get the proper visibility of both sides.
 
7:06 PM
If nothing else, it may be worthwhile to calculate the initial // 100 outside of the loop
 
wim
@AndrasDeak looks like you made the same mistake I had originally (not correctly factoring out the common code between "input" operands and "output" operands)
 
@wim I didn't want to do that on purpose. I'm adamant on shoehorning the output in there, hoping that we'll never get 2 :P
oh you meant that
 
wim
yeah, turns out you only need nargs.
 
meh, I'll go with that for now
 
wim
took me ages to untangle that
thank goodness for the tests
 
7:07 PM
I'm going to have to pay that switch price somewhere
no bug has come from that block yet, at least
 
wim
true, but ugly code is the worst place to pay it
 
well I did resist the urge to define a dict instead ;)
 
I think the default from (/now) Jan 1, 2020 should be for python tagged questions to be 3.x+ only, and anything 2.x explicitly tagged as such.
 
wim
@toonarmycaptain agree
many people are doing it wrong - tagging only python3.x and thus reducing the visibility/hammerability of their question greatly - and then the site suffers
doesn't directly affect me because I follow the python-3.x tag and have the 3.x hammer, but most users its neither. so the synonymization would help both the OP and the long time users.
 
That suggestion is independent from synonymizing, though. That suggestion is consistent with Martijn's comment.
 
7:12 PM
Can someone with appropriate retagging mod-ness use a bot to go through every python 2.x question and remove the python tag, and add it to every 3.x question?
 
wim
that would be gratuitous
 
yeah
 
wim
old questions should not be touched, but the synonymization should happen for the benefit of future content
 
Our last bot-retagging project didn't execute flawlessly, so I don't think there's much enthusiasm for trying again
 
@Kevin anything like that would have to be done by an employee
 
7:15 PM
Oh? Is there a rate limit or something now?
 
No, but setting bots loose on main is always frowned upon. Even non-bot humans mass editing things ruffles a lot of feathers.
I mean yeah, everything is rate limited, always has been, but that's beside my point ;)
 
Random question: Is there a way to use the g specifier in a f-string and append trailing zeros like the f specifier does? MCVE
 
Well...if you botted slowly and you didn't have a hammer, they'd get moderated?
 
wim
@toonarmycaptain that one got me too
 
@Code-Apprentice I think the point of g is that it will give you something short and nice (which is to say I don't know and I wouldn't be surprised if there wasn't a way)
 
wim
7:19 PM
because the test examples didn't have a "set offset" operation in relative mode. I only figured it by searching the intcode for ",209,".
 
I figured that was the problem when my first version didn't work
 
@AndrasDeak My understanding...or at least the way I'm trying to use it...is that g specifies the number of "significant digits" rather than the number of digits after the decimal point, which are two very different things.
and sigfigs should include trailing zeroes...
 
wim
@Arne is this cheating? view spoiler
 
@wim Thankyou - it is encouraging to know people far more skilled than I are getting tripped by some of the same things. view spoiler
 
wim
@Code-Apprentice I probably know this, but I can't see pastebin.com
 
7:29 PM
Hi. Presuming I have two lists and each list has multiple nested lists inside what is the best way for finding at least 1 common element and outputting the respective lists ?pastebin.com/ryuTxU6u I did this, but I'm looking at a more efficient way
 
7:47 PM
recbg
@wim :D
I also agree with the view that that is the most pointless video ever :D
@wim in fact, it is Python who wrote the dict class.
I very much would like to have a factorydict or sth that would just accept a k -> v function.
but we do not have it :'(
 
wim
Like a defaultdict where you have access to the key? Hmm.
 
What would the point of that be? If you already have a k->v function, why do you want to turn it into a dict?
 
wim
8:02 PM
the k->v is just the factory
 
Square brackets instead of parentheses?
 
wim
I can see the use cases (reuse some nice mapping APIs). Though as far as abusing OOP goes, to take advantage of the convenient __missing__ magic here, is only about a two out of ten on the "yuck" scale.
 
anyone familiar with regex in here? Need help editing this regex function to also replace spaces: REGEX_Replace([Full_Name__c], ".|-|'|,", "")
 
wim
I'll admit to doing the same in my AOCR, where the getitem can actually take in numpy arrays as "dict keys"
 
8:05 PM
function is used in a data prep tool called Alteryx so ignore the syntax for now
 
wim
@simplycoding The regex room is over at r"/rooms/^6\d+/".
 
yessss the hats are back :k
 
wim
Oh? I hadn't noticed. I have a userscript which renders everybody's avatar with a tiara, all year round.
 
8:23 PM
@wim Can I see mine?
 
@AnttiHaapala oh I get it
 
@wim thanks
 
8:41 PM
We're generally willing to answer regex-based questions in here, if you're using Python, and if you've got an MCVE. I'm not sure whether that code there is Python, but it's definitely not an MCVE yet
REGEX_Replace is not a built-in function name, or even a method of the built-in re module. And I can't just switch it out for re.sub because the type signature is wrong
 
My python question for the day: Is there an emoticon that depicts the frustration with auto correct?
 
(╯°□°)╯︵ ʇɔǝɹɹoɔoʇnɐ
 
that's amazingly good and far more than I expected
I'm going to sub that into my autocomplete in the iPhone. It'll sub for 'fuac'
 
(╯°□°)╯︵ suoᴉʇɐʇɔǝdxǝ ɹnoʎ
It bothers me that upside down t isn't aligned properly
 
so, are those unicode characters or some transformed ascii
 
8:52 PM
I don't think you can "transform ascii"
 
I wasn't sure if there is some markdown that did that.
 
Transforming ASCII characters isn't too far-fetched of an idea. RTL Mark exists, so why not BottomToTop mark?
 
@Kevin, well initially I was going to use regex in Python but that function is in another app
what would be the expression for finding a period, hyphen, apostrophe, and space characters?
 
Dunno how it works in "another app", but in Python,
>>> import re
>>> re.sub("\.|-|'|,| ", "", "foo.bar baz-qux'troz")
'foobarbazquxtroz'
 
8:55 PM
If you're working with regex, I'd recommend reading a regex tutorial. What you're asking for help with here is like the basics of the basics
 
I suggest a character class instead
and what Aran said
 
thanks
 
@Kevin I also suggest a raw string literal
 
Sure, fine
>>> re.sub(r"[.\-' ]", "", "foo.bar baz-qux'troz")
'foobarbazquxtroz'
 
I was hoping you could just edit :P
 
8:57 PM
But then future generations won't know how ignorant I was
 
and if you put - at the edge you don't need to escape it
 
Hmm, good idea. re.sub(r"[.' -]", "", "foo.bar baz-qux'troz")
 
and then you don't need a raw string literal anymore... :D
 
ಠ_ಠ
I'm attached to it now.
 
I understand, it's a very nice literal
 
00:00 - 21:0021:00 - 23:00

« first day (3341 days earlier)      last day (1598 days later) »