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:
| [ | |
| ["f", "Show next/latest diffs", "setProposedDiffBounds()"], | |
| ["n", "Next unreviewed file", "nextUnreviewedFile()"], | |
| ["p", "Previous unreviewed file", "prevUnreviewedFile()"], | |
| ["shift+n", "Next changed file", "nextChangedFile()"], | |
| ["shift+p", "Previous changed file", "prevChangedFile()"], | |
| [null, "Next visible file", "nextVisibleFile()"], | |
| [null, "Previous visible file", "prevVisibleFile()"], | |
| [null, "Next file", "nextFile()"], |
| #include <windows.h> | |
| #include <roapi.h> | |
| #include <iostream> | |
| #include <cwchar> | |
| #include <string> | |
| // For Windows.UI.ViewManagement.UISettings | |
| #include <windows.ui.viewmanagement.h> |
| #include <windows.h> | |
| #include <roapi.h> | |
| #include <iostream> | |
| #include <cwchar> | |
| // For Windows.UI.ViewManagement.UISettings | |
| #include <windows.ui.viewmanagement.h> | |
| int main() { |
| use std::mem; | |
| use std::ptr; | |
| struct Foo; | |
| impl Drop for Foo { | |
| fn drop(&mut self) { | |
| println!("Dropping Foo"); | |
| } | |
| } |
I hereby claim:
To claim this, I am signing this object:
| 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): |
| 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). |
| 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): | |
| """ |
| 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. |
| 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() |