Skip to content

Instantly share code, notes, and snippets.

View ahmedivy's full-sized avatar
🔍
searching...

Ahmed Abdullah ahmedivy

🔍
searching...
View GitHub Profile
@ahmedivy
ahmedivy / del.sql
Last active August 3, 2024 08:18
remove all postgres tables and data
do $$ declare
r record;
begin
for r in (select tablename from pg_tables where schemaname = 'my-schema-name') loop
execute 'drop table if exists ' || quote_ident(r.tablename) || ' cascade';
end loop;
end $$;
@ahmedivy
ahmedivy / script.py
Created February 22, 2023 14:38
Script to Store DataCamp Slides Efficiently and Automatically
import os
import re
import fitz
DESTINATION = r"<your_destination_folder_to_save_notes>"
path = os.path.join(os.path.expanduser('~'), 'Downloads')
files = [f for f in os.listdir(path) if re.search(r'chapter.+\.pdf', f)]