Skip to content

Instantly share code, notes, and snippets.

View YatinAdityaT's full-sized avatar
🙃
Learning...

Sabito YatinAdityaT

🙃
Learning...
View GitHub Profile

Keybase proof

I hereby claim:

  • I am yatinadityat on github.
  • I am yatin_so (https://keybase.io/yatin_so) on keybase.
  • I have a public key ASCyPknqEcCXoEV2W0_PewP7ziMSNrSc8zBF3srWGxCNFAo

To claim this, I am signing this object:

@YatinAdityaT
YatinAdityaT / socp
Last active May 13, 2021 08:01 — forked from jforberg/socp
Stack Overflow copy pasta
<USEFUL LINKS>
MSE FAQ https://meta.stackexchange.com/questions/7931/faq-for-stack-exchange-sites
http://idownvotedbecau.se/
MSE answer for common terms used: https://meta.stackexchange.com/questions/40353/stack-exchange-glossary-dictionary-of-commonly-used-terms
Canonical answer for python files with same names as import files: https://stackoverflow.com/a/36250354/11573842
@YatinAdityaT
YatinAdityaT / clean.py
Created June 11, 2021 11:22
Remove all comments from a .py file
# use python clean.py -f <filename>
# not meant to be very smart (can't distinguish "a = "#test"" for example...)
import os
import argparse
import re
parser = argparse.ArgumentParser()
parser.add_argument('-f', '--file', type=str)
args = parser.parse_args()