Did I find the right examples for you? yes no

All Samples(2)  |  Call(0)  |  Derive(0)  |  Import(2)
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/z/a/zamboni-HEAD/mkt/collections/views.py   zamboni(Download)
        except IntegrityError:
            raise ParseError(detail=self.exceptions['already_in'])
        return self.return_updated(status.HTTP_200_OK)
 
    @action()
        if not removed:
            return Response(status=status.HTTP_205_RESET_CONTENT)
        return self.return_updated(status.HTTP_200_OK)
 
    @action()
                'apps': [a.pk for a in collection.apps()]
            }, status=status.HTTP_400_BAD_REQUEST, exception=True)
        return self.return_updated(status.HTTP_200_OK)
 
    def serialized_curators(self, no_cache=False):

src/d/e/deis-HEAD/controller/api/views.py   deis(Download)
                            status=status.HTTP_404_NOT_FOUND,
                            content_type='text/plain')
        return Response(logs, status=status.HTTP_200_OK,
                        content_type='text/plain')
 
        except EnvironmentError as e:
            return Response(str(e), status=status.HTTP_400_BAD_REQUEST)
        return Response(output_and_rc, status=status.HTTP_200_OK,
                        content_type='text/plain')
 
            response = {'release': {'version': app.release_set.latest().version},
                        'domains': ['.'.join([app.id, app.cluster.domain])]}
            return Response(response, status=status.HTTP_200_OK)
        raise PermissionDenied()
 
            config = app.release_set.latest().config
            serializer = self.get_serializer(config)
            return Response(serializer.data, status=status.HTTP_200_OK)
        raise PermissionDenied()
 

src/a/t/atmosphere-HEAD/api/instance.py   atmosphere(Download)
                {"action":"console",
                 "description":"Get noVNC Console."}]
        response = Response(api_response, status=status.HTTP_200_OK)
        return response
 
                'object': result_obj,
            }
            response = Response(api_response, status=status.HTTP_200_OK)
            return response
        ### Exception handling below..
            serialized_data = InstanceSerializer(core_instance,
                                                 context={'user':request.user}).data
            response = Response(serialized_data, status=status.HTTP_200_OK)
            response['Cache-Control'] = 'no-cache'
            return response

src/a/t/atmosphere-HEAD/api/machine_request.py   atmosphere(Download)
 
        serializer = MachineRequestSerializer(machine_requests, many=True)
        return Response(serializer.data, status=status.HTTP_200_OK)
 
 
        serializer = MachineRequestSerializer(machine_request)
        if not action:
            return Response(serializer.data, status=status.HTTP_200_OK)
 
        machine_request = serializer.object
 
        serializer = MachineRequestSerializer(machine_request)
        return Response(serializer.data, status=status.HTTP_200_OK)
 
    def patch(self, request, machine_request_id, action=None):
        #Object may have changed
        serializer = MachineRequestSerializer(machine_request)
        return Response(serializer.data, status=status.HTTP_200_OK)
 
 

src/a/t/atmosphere-HEAD/api/meta.py   atmosphere(Download)
            if 'test_links' in action:
                test_links = esh_meta.test_links()
                return Response(test_links, status=status.HTTP_200_OK)
        except InvalidCredsError:
            logger.warn('Authentication Failed. Provider-id:%s Identity-id:%s'

src/d/j/django-rest-auth-0.1/rest_auth/views.py   django-rest-auth(Download)
                    token, created = Token.objects.get_or_create(user=user)
                    return Response(TokenSerializer(token).data,
                                    status=status.HTTP_200_OK)
                else:
                    return Response({'error': 'This account is disabled.'},
 
        return Response({"success": "Successfully logged out."},
                        status=status.HTTP_200_OK)
 
 
            'user': user_details.data,
            'profile': serializer.data},
            status=status.HTTP_200_OK)
 
    def post(self, request):
 
            # Return the User object with OK HTTP status
            return Response(serializer.data, status=status.HTTP_200_OK)
 
        else:
                return Response(
                    {"success": "Password reset e-mail has been sent."},
                    status=status.HTTP_200_OK)
 
            else:

src/t/r/treeherder-service-HEAD/vendor/rest_framework/mixins.py   treeherder-service(Download)
            created = False
            save_kwargs = {'force_update': True}
            success_status_code = status.HTTP_200_OK
 
        serializer = self.get_serializer(self.object, data=request.DATA,

src/d/j/djangorestframework-2.3.13/rest_framework/mixins.py   djangorestframework(Download)
        self.object = serializer.save(force_update=True)
        self.post_save(self.object, created=False)
        return Response(serializer.data, status=status.HTTP_200_OK)
 
    def partial_update(self, request, *args, **kwargs):

src/d/j/django-rest-framework-HEAD/rest_framework/mixins.py   django-rest-framework(Download)
        self.object = serializer.save(force_update=True)
        self.post_save(self.object, created=False)
        return Response(serializer.data, status=status.HTTP_200_OK)
 
    def partial_update(self, request, *args, **kwargs):

src/d/j/django-rest-auth-HEAD/rest_auth/views.py   django-rest-auth(Download)
                    token, created = Token.objects.get_or_create(user=user)
                    return Response(TokenSerializer(token).data,
                                    status=status.HTTP_200_OK)
                else:
                    return Response({'error': 'This account is disabled.'},
 
        return Response({"success": "Successfully logged out."},
                        status=status.HTTP_200_OK)
 
 
            'user': user_details.data,
            'profile': serializer.data},
            status=status.HTTP_200_OK)
 
    def post(self, request):
 
            # Return the User object with OK HTTP status
            return Response(serializer.data, status=status.HTTP_200_OK)
 
        else:
                return Response(
                    {"success": "Password reset e-mail has been sent."},
                    status=status.HTTP_200_OK)
 
            else:

  1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9  Next