Did I find the right examples for you? yes no

All Samples(1)  |  Call(0)  |  Derive(0)  |  Import(1)
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/d/e/deis-HEAD/controller/api/views.py   deis(Download)
    def list(self, request, **kwargs):
        app = get_object_or_404(self.model, id=kwargs['id'])
        perm_name = "api.{}".format(self.perm)
        if request.user != app.owner and not request.user.has_perm(perm_name, app):
            return Response(status=status.HTTP_403_FORBIDDEN)
    def create(self, request, **kwargs):
        app = get_object_or_404(self.model, id=kwargs['id'])
        if request.user != app.owner:
            return Response(status=status.HTTP_403_FORBIDDEN)
        user = get_object_or_404(User, username=request.DATA['username'])
    def destroy(self, request, **kwargs):
        app = get_object_or_404(self.model, id=kwargs['id'])
        if request.user != app.owner:
            return Response(status=status.HTTP_403_FORBIDDEN)
        user = get_object_or_404(User, username=kwargs['username'])

src/t/r/treeherder-service-HEAD/vendor/rest_framework/exceptions.py   treeherder-service(Download)
class PermissionDenied(APIException):
    status_code = status.HTTP_403_FORBIDDEN
    default_detail = 'You do not have permission to perform this action.'
 
 

src/d/j/djangorestframework-2.3.13/rest_framework/exceptions.py   djangorestframework(Download)
class PermissionDenied(APIException):
    status_code = status.HTTP_403_FORBIDDEN
    default_detail = 'You do not have permission to perform this action.'
 
 

src/d/j/django-rest-framework-HEAD/rest_framework/exceptions.py   django-rest-framework(Download)
class PermissionDenied(APIException):
    status_code = status.HTTP_403_FORBIDDEN
    default_detail = 'You do not have permission to perform this action.'
 
 

src/l/i/lightforum-HEAD/rest_framework/exceptions.py   lightforum(Download)
class PermissionDenied(APIException):
    status_code = status.HTTP_403_FORBIDDEN
    default_detail = 'You do not have permission to perform this action.'
 
 

src/z/a/zamboni-HEAD/mkt/comm/views.py   zamboni(Download)
        else:
            return Response('Requested update operation not supported',
                status=status.HTTP_403_FORBIDDEN)
 
 
            elif not user_has_perm_app(profile, form.cleaned_data['app']):
                return Response('You do not have permissions for this app',
                                status=status.HTTP_403_FORBIDDEN)
 
            queryset = CommunicationThread.objects.filter(
    def create(self, request, *args, **kwargs):
        if not waffle.switch_is_active('comm-dashboard'):
            return Response(status=status.HTTP_403_FORBIDDEN)
 
        form = forms.CreateCommThreadForm(request.DATA)
    def create(self, request, *args, **kwargs):
        if not waffle.switch_is_active('comm-dashboard'):
            return Response(status=status.HTTP_403_FORBIDDEN)
 
        thread = get_object_or_404(CommunicationThread, id=kwargs['thread_id'])
                [{'non_field_errors':
                  'You must be owner of the note to attach a file.'}],
                status=status.HTTP_403_FORBIDDEN)
 
        # Validate attachment.

src/z/a/zamboni-HEAD/mkt/webpay/views.py   zamboni(Download)
                     .format(region.id, app.get_price_region_ids()))
            return Response('Payments are limited and flag not enabled',
                            status=status.HTTP_403_FORBIDDEN)
 
        if app.is_premium() and app.has_purchased(request._request.amo_user):

src/a/t/atmosphere-HEAD/api/project.py   atmosphere(Download)
        elif not Group.check_access(user, data['owner']):
            return failure_response(
                    status.HTTP_403_FORBIDDEN,
                    "Current User: %s - Cannot assign project for group %s"
                    % (user.username, data['owner']))

src/f/r/freesound-HEAD/apiv2/exceptions.py   freesound(Download)
class RequiresHttpsException(APIException):
    detail = None
    status_code = status.HTTP_403_FORBIDDEN
 
    def __init__(self, msg="This resource requires a secure connection (https)"):

src/o/n/onepercentclub-site-HEAD/apps/cowry_docdata_legacy/views.py   onepercentclub-site(Download)
                except DocDataPaymentOrder.DoesNotExist:
                    logger.error('Could not find order {0} to update payment status.'.format(order))
                    return response.Response(status=status.HTTP_403_FORBIDDEN)
 
                # Update the status for the payment.
            else:
                logger.error('Could not match order {0} to update payment status.'.format(order))
        return response.Response(status=status.HTTP_403_FORBIDDEN)
 

  1 | 2 | 3 | 4  Next