This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
❯ 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") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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}') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo tlmgr install pgf | |
sudo tlmgr install titling | |
sudo tlmgr install xcolor | |
sudo tlmgr install environ | |
sudo tlmgr install trimspaces | |
sudo tlmgr install mathpazo | |
sudo tlmgr install parskip | |
sudo tlmgr install adjustbox | |
sudo tlmgr install collectbox | |
sudo tlmgr install eurosym |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import cv2 | |
import numpy as np | |
from collections import deque | |
class Airpainter(object): | |
""" | |
An airpainter application. | |
The application takes video feed as input and outputs lines tracked. | |
Attributes |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import argparse | |
import os, glob | |
parser = argparse.ArgumentParser() | |
def dir_path(string): | |
if os.path.isdir(string): | |
return string | |
else: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as mp | |
import pandas as pd | |
import datetime as dt | |
def df_info(f): | |
def wrapper(df, *args, **kwargs): | |
tic = dt.datetime.now() | |
result = f(df, *args, **kwargs) | |
toc = dt.datetime.now() | |
print("\n\n{} took {} time\n".format(f.__name__, toc - tic)) |