I hereby claim:
- I am oertels on github.
- I am schneck (https://keybase.io/schneck) on keybase.
- I have a public key ASD3yZ1eWvhy70nzL2uGVhkYCN-uxj6UykXkzDzZ50PGRAo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| import React, { Component } from 'react'; | |
| import { Navigation } from 'react-native-navigation'; | |
| import { Text, View } from 'react-native'; | |
| Navigation.registerComponent('FirstTabScreen', () => <View><Text>Screen 1</Text></View>); | |
| Navigation.registerComponent('SecondTabScreen', () => <View><Text>Screen 2</Text></View>); | |
| Navigation.startTabBasedApp({ | |
| tabs: [ |
| >>> complicated_multiply = lambda x: lambda y: x*y | |
| >>> complicated_multiply(10)(20) | |
| 200 |
| # -*- coding: utf-8 -*- | |
| from django.http import HttpResponseRedirect | |
| from django.conf import settings | |
| class LoginRequired(object): | |
| def __init__(self): | |
| self.login_url = getattr(settings, 'LOGIN_URL', '/accounts/login/') | |
| def process_request(self, request): |
| @typecheck | |
| def foo(bar:int) -> int: | |
| return bar * 2 | |
| >>> foo(3) | |
| 6 | |
| >>> foo('bar') | |
| Traceback (most recent call last): | |
| File "<stdin>", line 1, in <module> |
| from datetime import timedelta, datetime | |
| cigarettes_at = ( | |
| datetime(2012,01,5,16,0,30), | |
| datetime(2012,01,12,12,3,30), | |
| datetime(2012,01,22,18,12,30), | |
| datetime(2012,01,23,18,12,30), | |
| ) | |
| print "Not smoking since: %s" % max(cigarettes_at) | |
| print "Longest streak: %s" % max((x-y) for (x, y) in zip(cigarettes_at[1:], cigarettes_at[:-1])) |