Skip to content

Instantly share code, notes, and snippets.

@al1p-R
al1p-R / replace_benchmark.py
Last active April 16, 2023 08:36
Benchmarking different string replace methods - example from @MarcinJuraszek ported to Python by ChatGPT - https://gist.github.com/MarcinJuraszek/c1437d925548561ba210a1c6ed144452
# Based on https://gist.github.com/MarcinJuraszek/c1437d925548561ba210a1c6ed144452 from @MarcinJuraszek
# Ported to python by ChatGPT 4
'''
RESULTS
Replace using regex:
0.02475070800028334
Replace using multiple replace calls:
0.0008895419996406417
Replace using split and join:
@al1p-R
al1p-R / gist:c64cd4ff4fbf2b64e6b18aaae7acfd85
Last active December 8, 2021 08:33
cdktf deploy - error
cdktf deploy  I
⠼ synthesizing...
[2021-12-08T10:31:24.905] [ERROR] default - b'!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n'
[2021-12-08T10:31:24.906] [ERROR] default - b'!! !!\n'
b'!! This software has not been tested with node v17.2.0. !!\n'
b'!! You may to encounter runtime issues, and should switch to a supported release. !!\n'
b'!! !!\n'
b'!! As of the current release, supported versions of node are: !!\n'
b'!! - ^12.7.0 !!\n'
### Keybase proof
I hereby claim:
* I am al1p-r on github.
* I am alainrev (https://keybase.io/alainrev) on keybase.
* I have a public key ASCcT0ejBBoT7TSzYqOMBW_t76wsq7pW4seTBR6e6gkGswo
To claim this, I am signing this object: