This file contains 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 time | |
from memory_profiler import memory_usage | |
import logging | |
celery_logger = logging.getLogger('celery') | |
def track_celery(method): | |
""" |
This file contains 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
<!-- Author: Vinodkumar Puliyadi - Simple Scroller Demo --> | |
<html> | |
<head> | |
<title>Scrolling Script</title> | |
</head> | |
<style type="text/css"> | |
body{ padding:0px; margin:0px; height: 2000px; } | |
#container{ position: relative; height: 2500px; background-color: red; width: 80%; margin:0 auto; } | |
#adbox{ position: absolute; top:200; right:0; height: 600px; width:200px; background-color:black; color:#fff; } | |
</style> |
This file contains 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
from datetime import datetime, timedelta | |
def get_days_count_between_date(from_date, to_date, count=True): | |
from_date = datetime.strptime(from_date, "%Y-%m-%d %H:%M:%S").date() | |
to_date = datetime.strptime(to_date, "%Y-%m-%d %H:%M:%S").date() | |
delta = to_date - from_date | |
date_range = [ from_date + timedelta(days=i) for i in range(delta.days + 1)] | |
if count: | |
return len(date_range) |