Skip to content

Instantly share code, notes, and snippets.

View aykut's full-sized avatar

Aykut Özat aykut

  • Akinon
  • İstanbul
View GitHub Profile
@aykut
aykut / __init__.py
Created November 24, 2014 08:49
# this script finds and uploads subtitles which matches all(or under given parent folder) video files in your putio account.
# this script finds and uploads subtitles which matches all(or under given parent folder) video files in your putio account.
@aykut
aykut / queryset_chunker.py
Last active August 29, 2015 14:19
QuerySet chunker
def queryset_chunker(queryset, order_by='-pk', chunk_size=5000):
"""
Takes lazy queryset and chunks it by given chunk_size.
:param queryset: type of queryset. This is a lazy queryset to
split into chunks
:type queryset: QuerySet
:param chunk_size: size of smaller pieces
:type chunk_size: int
"""
[
{
"status": "success",
"systemTime": 1485206254203,
"cardFamily": "Bonus",
"binNumber": "528293",
"bankName": "T\u00fcrkiye Finans Kat\u0131l\u0131m Bankas\u0131",
"locale": "tr",
"cardAssociation": "MASTER_CARD",
"conversationId": "123456789",