This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def memory_usage(): | |
| """ | |
| :return: memory usage in MB | |
| """ | |
| mem = psutil.Process(os.getpid()).memory_info().rss | |
| return mem / 1024 ** 2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import pandas as pd | |
| from google.cloud import firestore | |
| db = firestore.Client() | |
| users = list(db.collection(u'users').stream()) | |
| users_dict = list(map(lambda x: x.to_dict(), users)) | |
| df = pd.DataFrame(users_dict) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ALTER TABLE `dataset.table` | |
| SET OPTIONS ( | |
| partition_expiration_days=30 | |
| ); |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| println(1.getClass) | |
| println("Hello").getClass | |
| println(println("Hello").getClass) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Variables | |
| variable "region"{ | |
| type = string | |
| } | |
| variable "email_list"{ | |
| type = list(string) | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # clone all gists of the accou | |
| # with url id | |
| #for name in $( gh gist list | awk '{print $2}'); do gh gist clone $name; done; | |
| # with description folder | |
| #gh api \ |
OlderNewer