Skip to content

Instantly share code, notes, and snippets.

View ayushkumarshah's full-sized avatar
🏠
Working from home

Ayush Kumar Shah ayushkumarshah

🏠
Working from home
View GitHub Profile
@ayushkumarshah
ayushkumarshah / csv.py
Created February 9, 2021 12:31 — forked from cccntu/csv.py
python mmap to concatenate csv files
❯ rm out.csv
❯ cat 1.py
from glob import glob
import mmap
files = glob("data/*")
files.sort(key=lambda x: int(x.split("/")[-1].split(".")[0]))
write_f = open("out.csv", "w+b")
def my_function():
print('Hi')
print(my_function)
# <function my_function at 0x7efea5c36050>
def send_email_ses(email_message):
print(f'Send email using AWS SES: {email_message}')