Skip to content

Instantly share code, notes, and snippets.

View ulkoart's full-sized avatar

Artem Ulko ulkoart

  • Russia, Krasnodar
View GitHub Profile
// Разное интересное по многопоточности:
// Featured-секция, для любителей архивной документации от Apple:
1. - про внутренности потоков в MAC OS X в сравнении с MAC OS 9
2. - Kernel Programming guide, вы же понимаете, что там будет, да :D
// Для любителей WWDC:
1. - GCD раз.
ulkoart /
Created October 16, 2018 05:03 — forked from ivlevdenis/
Django graphene orderBy
from graphene import relay, String, List
from graphene_django.filter import DjangoFilterConnectionField
from graphene_django.fields import DjangoConnectionField
from app.models import Model
class Object(DjangoObjectType):
class Meta:
model = Model
ulkoart /
Created October 31, 2017 11:12 — forked from syrusakbary/
Django efficient queryset iterator (by dividing in chunks). Taked from
import gc
def queryset_iterator(queryset, chunksize=1000):
Iterate over a Django Queryset ordered by the primary key
This method loads a maximum of chunksize (default: 1000) rows in it's
memory at the same time while django normally would load all rows in it's
memory. Using the iterator() method only causes it to not preload all the