This is my recommended path for learning Haskell.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- scratch work and implementations for http://www.seas.upenn.edu/~cis194/lectures/01-intro.html | |
-- exercises: http://www.seas.upenn.edu/~cis194/hw/01-intro.pdf | |
intLen :: Integer -> Integer | |
intLen n | |
| (abs n) < 10 = 1 | |
| otherwise = intLen (n `div` 10) + 1 | |
-- Exercise 1 | |
-- "toDigits should convert positive Integers to a list of digits" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
html:5>div.container>div.class.jumbotron>div.class.container>h1+p+p>a^^^div.row>div.col-lg-6*2>h2+p^^div.row>div.col-lg-4*3>h3+p |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from rest_framework import filters | |
class SearchFieldFilter(filters.BaseFilterBackend): | |
"""Filter based on record attributes.""" | |
def filter_queryset(self, request, queryset, view): | |
ALLOWED_ENDINGS = ('__exact', '__iexact', '__contains', '__icontains', | |
'__gt', '__gte', '__lt', '__lte', '__startswith', | |
'__istartswith', '__endswith', '__iendswith', '__isnull', | |
'__search',) |