Skip to content

Instantly share code, notes, and snippets.

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

Hasan Sezer Taşan hasansezertasan

🏠
Working from home
View GitHub Profile
@hasansezertasan
hasansezertasan / main.py
Created May 12, 2024 01:12
How to use SQLAlchemy with numerical enums?
"""
How to use SQLAlchemy with numerical enums?
`IntEnum` class is taken from this article: [Using Python enums in SQLAlchemy models](https://michaelcho.me/article/using-python-enums-in-sqlalchemy-models/), all credits to the author.
"""
import datetime
import enum
from sqlalchemy import Integer, TypeDecorator, create_engine
@hasansezertasan
hasansezertasan / udemy-checker-readme.md
Last active July 19, 2022 11:43
Udemy Status Checker

Udemy checker

Sometimes i do this when i finish the course, un-check all of the lessons i watch. So i created the script and i said to myself "do it with some options". So here it is...

// Instant checking for the un-collapsed sections
var checkboxes = document.getElementsByClassName("udlite-sr-only udlite-real-toggle-input")
for (const checkbox of checkboxes) {
  if (!checkbox.checked) {
    checkbox.click()