Skip to content

Instantly share code, notes, and snippets.

View puliyadivinod's full-sized avatar
🎯
Focusing

Vinod Puliyadi puliyadivinod

🎯
Focusing
View GitHub Profile
@puliyadivinod
puliyadivinod / get_days_count_between_date.py
Created January 8, 2014 02:39
Get days count between two date
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)
@puliyadivinod
puliyadivinod / scroller.html
Created January 8, 2014 20:17
Simple Scroller Demo
<!-- 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>
@puliyadivinod
puliyadivinod / track_celery.py
Created August 9, 2019 15:58 — forked from hanneshapke/track_celery.py
Decorator for Celery functions to measure the execution time and memory usage
import time
from memory_profiler import memory_usage
import logging
celery_logger = logging.getLogger('celery')
def track_celery(method):
"""