Skip to content

Instantly share code, notes, and snippets.

View saveychauhan's full-sized avatar
🚀

Sawan Chauhan saveychauhan

🚀
View GitHub Profile
@marcoslin
marcoslin / .gitignore
Last active August 31, 2023 15:37
Encryption: From PyCrypto to CryptoJS
source.sh
@dcwatson
dcwatson / range_streaming.py
Last active May 6, 2023 20:10
Django streaming view accepting byte range requests
from django.http import StreamingHttpResponse
from wsgiref.util import FileWrapper
import mimetypes
import os
import re
range_re = re.compile(r'bytes\s*=\s*(\d+)\s*-\s*(\d*)', re.I)
class RangeFileWrapper (object):
def __init__(self, filelike, blksize=8192, offset=0, length=None):