Skip to content
View susmithagudapati's full-sized avatar
👩‍💻
👩‍💻

Block or report susmithagudapati

Block user

Prevent this user from interacting with your repositories and sending you notifications. Learn more about blocking users.

You must be logged in to block users.

Please don't include any personal information such as legal names or email addresses. Maximum 100 characters, markdown supported. This note will be visible to only you.
Report abuse

Contact GitHub support about this user’s behavior. Learn more about reporting abuse.

Report abuse

Pinned Loading

  1. Image-Classifier-DSND Image-Classifier-DSND Public

    This project is basically a Python application that can train an image classifier on a dataset, then predict new images using the trained model. After developing the code for an image classifier bu…

    HTML 1

  2. indexes_sample.py indexes_sample.py
    1
    # create indexes using Field.db_index value
    2
    class Product(models.Model):
    3
        name = models.CharField(max_length=128, db_index=True)
    4
        upc = models.CharField(max_length=32, unique=True)
    5
        category = models.ForeignKey(
  3. caching_querysets.py caching_querysets.py
    1
    # instantiates a queryset and cache is empty.
    2
    product = Product.objects.get(id=5)
    3
    
                  
    4
    # Category object is retrieved from the database at this point 
    5
    # and the results are saved in queryset's cache.
  4. async_to_sync_sample.py async_to_sync_sample.py
    1
    from asgiref.sync import async_to_sync
    2
    
                  
    3
    sync_function = async_to_sync(async_function)
    4
    
                  
    5
    @async_to_sync
  5. prefetch_related.py prefetch_related.py
    1
    >>> Product.objects.count()
    2
    220
    3
    
                  
    4
    # 220 queries - __str__ is called for each product
    5
    Product.objects.all()
  6. aggregating_annotations.py aggregating_annotations.py
    1
    from django.db.models import Avg, Count
    2
    
                  
    3
    # first annotates each product with number of attributes,
    4
    # and then aggregates the average number of authors using the annotated attribute
    5