Did I find the right examples for you? yes no

All Samples(0)  |  Call(0)  |  Derive(0)  |  Import(0)
int(x=0) -> int or long
int(x, base=10) -> int or long

Convert a number or string to an integer, or return 0 if no arguments
are given.  If x is floating point, the conversion truncates towards zero.
If x is outside the integer range, the function returns a long instead.

If x is not a number or if base is given, then x must be a string or
Unicode object representing an integer literal in the given base.  The
literal can be preceded by '+' or '-' and be surrounded by whitespace.(more...)

src/t/r/treeherder-service-HEAD/vendor/rest_framework/exceptions.py   treeherder-service(Download)
class AuthenticationFailed(APIException):
    status_code = status.HTTP_401_UNAUTHORIZED
    default_detail = 'Incorrect authentication credentials.'
 
 
class NotAuthenticated(APIException):
    status_code = status.HTTP_401_UNAUTHORIZED

src/d/j/djangorestframework-2.3.13/rest_framework/exceptions.py   djangorestframework(Download)
class AuthenticationFailed(APIException):
    status_code = status.HTTP_401_UNAUTHORIZED
    default_detail = 'Incorrect authentication credentials.'
 
 
class NotAuthenticated(APIException):
    status_code = status.HTTP_401_UNAUTHORIZED

src/d/j/django-rest-framework-HEAD/rest_framework/exceptions.py   django-rest-framework(Download)
class AuthenticationFailed(APIException):
    status_code = status.HTTP_401_UNAUTHORIZED
    default_detail = 'Incorrect authentication credentials.'
 
 
class NotAuthenticated(APIException):
    status_code = status.HTTP_401_UNAUTHORIZED

src/l/i/lightforum-HEAD/rest_framework/exceptions.py   lightforum(Download)
class AuthenticationFailed(APIException):
    status_code = status.HTTP_401_UNAUTHORIZED
    default_detail = 'Incorrect authentication credentials.'
 
 
class NotAuthenticated(APIException):
    status_code = status.HTTP_401_UNAUTHORIZED

src/a/t/atmosphere-HEAD/api/meta.py   atmosphere(Download)
                        % (provider_id, identity_id))
            return failure_response(
                status.HTTP_401_UNAUTHORIZED,
                'Identity/Provider Authentication Failed')
        except NotImplemented, ne:

src/a/t/atmosphere-HEAD/api/user.py   atmosphere(Download)
        if user.username is not 'admin' or not user.is_superuser:
            return Response('Only admin and superusers can create accounts',
                            status=status.HTTP_401_UNAUTHORIZED)
 
        username = params['username']
    def get(self, request):
        user = request.user
        if user.username is not 'admin' and not user.is_superuser:
            return Response('Only admin and superusers can view all accounts',
                            status=status.HTTP_401_UNAUTHORIZED)
                'Only admin and superusers '
                + 'can view individual account profiles',
                status=status.HTTP_401_UNAUTHORIZED)
 
        logger.info(request.__dict__)
                'Only admin and superusers '
                + 'can delete individual account profiles',
                status=status.HTTP_401_UNAUTHORIZED)
        return Response('NotImplemented',
                        status=status.HTTP_501_NOT_IMPLEMENTED)
                'Only admin and superusers '
                + 'can update individual account profiles',
                status=status.HTTP_401_UNAUTHORIZED)
        return Response('NotImplemented',
                        status=status.HTTP_501_NOT_IMPLEMENTED)

src/a/t/atmosphere-HEAD/api/instance.py   atmosphere(Download)
            user = user[0]
        else:
            return failure_response(status.HTTP_401_UNAUTHORIZED,
                                    'User not found')
        page = params.pop('page', None)

src/d/j/django-rest-auth-0.1/rest_auth/views.py   django-rest-auth(Download)
                else:
                    return Response({'error': 'This account is disabled.'},
                                    status=status.HTTP_401_UNAUTHORIZED)
            else:
                return Response({'error': 'Invalid Username/Password.'},
                                status=status.HTTP_401_UNAUTHORIZED)

src/d/j/django-rest-auth-HEAD/rest_auth/views.py   django-rest-auth(Download)
                else:
                    return Response({'error': 'This account is disabled.'},
                                    status=status.HTTP_401_UNAUTHORIZED)
            else:
                return Response({'error': 'Invalid Username/Password.'},
                                status=status.HTTP_401_UNAUTHORIZED)

src/a/t/atmosphere-HEAD/api/machine.py   atmosphere(Download)
        else:
            return failure_response(
                status.HTTP_401_UNAUTHORIZED,
                "User not found.")
        esh_driver = prepare_driver(request, provider_id, identity_id)
        if not user:
            return failure_response(
                status.HTTP_401_UNAUTHORIZED,
                "User not found.")
        query = request.QUERY_PARAMS.get('query')
                        % (user.username))
            return failure_response(
                status.HTTP_401_UNAUTHORIZED,
                "Only Staff and the machine Owner "
                + "are allowed to change machine info.")
            logger.error('Non-staff/non-owner trying to update a machine')
            return failure_response(
                status.HTTP_401_UNAUTHORIZED,
                'Only Staff and the machine Owner '
                + 'are allowed to change machine info.')

  1 | 2  Next