Skip to content

Instantly share code, notes, and snippets.

View 0xDevansh's full-sized avatar

Devansh 0xDevansh

View GitHub Profile
@0xDevansh
0xDevansh / readauthors.py
Created June 23, 2023 15:58
Parsing openlibrary works and authors dump to sqlite database
import json
import sqlite3
import traceback
from contextlib import closing
global init_count
STEP_SIZE = 1000
with open('count_a.txt', 'r') as file:
init_count = 0
count = file.read().rstrip()
@CMCDragonkai
CMCDragonkai / exporting_modules_functions_from_python_init.md
Last active July 15, 2024 09:44
Exporting Modules and Functions from Python `__init__.py` #python

Exporting Modules and Functions from Python __init__.py

Any directory with __init__.py is considered a package in Python.

Any python files inside a package is considered a module.

Modules contain functions and other bindings that is always exported.

If you are outside the package, and you want to import a module from a package: