Saturday 9 January 2021

Defaultdict in Python

 

Defaultdict is a subclass of built-in dict class that returns dictionary-like object. It is present in Collections module.

Functionality

Both dict and defaultdict have similar functionalities except that in defaultdict a default value is provided for the key that does not exist.

Note: For more information, please check Python Dictionaries .

 

Creating Defaultdict

Default dict can be created using built-in defalutdict( ) function:

# importing defaultdict from the collections module

from collections import defaultdict

def default_factory( ):
    return "Deafult Value"

defDict = defaultdict( default_factory )
defDict["alpha"] = 0
defDict["beta"] = 1

print(defDict["gamma"])
print(defDict["alpha"])

 


default_factory: An attribute which is a function returning the default value for the dictionary defined. If this argument is absent then the dictionary raises a KeyError.

 If default_factory attribute is absent: KeyError is raised


 

Using int as default_factory

When the int class is used as a default_factory and passed to the defaultdict( ), zero is used as default value for the key that does not exists.


from collections import defaultdict

defDict = defaultdict( int )
defDict["alpha"] = 1
defDict["beta"] = 2
print(defDict["gamma"])
print(defDict["alpha"])

 


 

 

Sunday 3 January 2021

Comparisons - GSuite vs GSuite Business vs GSuite Enterprise

Or, Comparisons - G Suite Basic and Business editions 

Or, Compare Google Workspace editions

Or, Where to check for pricing of Google Workspace?

You may refer the attached PDF here for the detailed Comparisons - GSuite vs GSuite Business vs GSuite Enterprise.

How do I know which gsuite offering ‘best ’aligns to my current subscription or business needs?

Below given illustration of the offering may be best suited for you based on your company need. Please reach out to your Google Account Manager to deep dive further and learn about our current migration offers.


 






Comparisons - G Suite Basic and Business editions

https://support.google.com/a/answer/10078573

 

Compare Google Workspace editions

https://support.google.com/a/answer/6043385

 

Where to check for pricing of Google Workspace?

https://workspace.google.com/pricing.html

 

Cheers! Please write me back if you have any query or feedback on this.

Sunday 2 August 2020

Do archive emails helps you to re-claim inbox or drive space in Gmail?

Marking or Moving emails to 'Archive' on Gmail does not help in reclaiming the google drive space.

To reclaim google drive space, you should cleanup unwanted emails, attachments, files, and folders etc...

You may upvote this feature request, and based on the user's feedback google may come up with something to help users reclaiming the google drive space without the need of buying additional storage space.

Upvote this feature request!

Cheers! Please write me back if you have any query or feedback.

Sunday 28 June 2020

Migrate Yammer from one O365 tenant to another O365 tenant

Can we migrate Yammer from one to another O365 tenant?

Description: As of now it’s not supported to migrate yammer from one MS O365 tenant to another MS O365 tenant. However, you can consolidate multiple Yammer Network between verified domains using Network Migration tool from Yammer Admin Center.







Reference Microsoft's KBs:

Cannot migrate a Yammer network across Office 365 tenants

Network migration - Consolidate multiple Yammer networks

 

Cheers, Please write me back if you have any query or feedback on this.