I hereby claim:
- I am mlalic on github.
- I am mlalic (https://keybase.io/mlalic) on keybase.
- I have a public key whose fingerprint is FC9C 2B32 9C4D C82A 665E D385 35E3 69DF 9555 6536
To claim this, I am signing this object:
class DuplicateDict(object): | |
def __init__(self): | |
self._items = [] | |
def items(self): | |
return self._items | |
def __iter__(self): | |
def wrap(): | |
for key, value in self._items: |
import click | |
import string | |
import random | |
def _randomize(alphabet, count): | |
"""Return a random string consisting of characters from the alphabet. | |
The length of the returned string should be ``count``. | |
""" | |
rng = random.SystemRandom() |
from django.db.models import fields as django_fields | |
class FilteredModelViewSetMixin(object): | |
""" | |
A mixin providing the possibility to filter the queryset based on | |
query parameters. | |
The mixin overrides the ``get_queryset`` method to return the original | |
queryset additionally filtered based on the query string parameters. |
class FuzzyForeignKeyChoice(factory.fuzzy.BaseFuzzyAttribute): | |
""" | |
A custom FuzzyAttribute for ``factory_boy`` which choses a random instance | |
of a model for a new instance's field value. | |
""" | |
def __init__(self, model): | |
self.model = model | |
def get_queryset(self): | |
""" |
class MultiSerializerViewSetMixin(object): | |
""" | |
Mixin for the DRF ViewSet providing the ability to choose a different | |
serializer based on the view action. | |
Classes mixing it in need to provide the ``serializer_classes`` | |
dictionary mapping an action to a serializer class. | |
If a particular action does not have a custom serializer attached to it, | |
the mixin delegates the call up the MRO (Method Resolution Order). |
from django.core.paginator import ( | |
Paginator, | |
EmptyPage, | |
) | |
from rest_framework.templatetags.rest_framework import replace_query_param | |
from rest_framework.response import Response | |
class PaginatedListModelMixin(object): |
I hereby claim:
To claim this, I am signing this object:
use std::mem; | |
use std::ptr; | |
struct Foo; | |
impl Drop for Foo { | |
fn drop(&mut self) { | |
println!("Dropping Foo"); | |
} | |
} |
#include <windows.h> | |
#include <roapi.h> | |
#include <iostream> | |
#include <cwchar> | |
// For Windows.UI.ViewManagement.UISettings | |
#include <windows.ui.viewmanagement.h> | |
int main() { |
#include <windows.h> | |
#include <roapi.h> | |
#include <iostream> | |
#include <cwchar> | |
#include <string> | |
// For Windows.UI.ViewManagement.UISettings | |
#include <windows.ui.viewmanagement.h> |