http://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html https://www.youtube.com/watch?v=_wiGpBQGCjU
  
    
      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
    
  
  
    
  | # Specify the provider (GCP) and the version of the API | |
| provider "google" { | |
| version = "~> 2.15" | |
| } | |
| # Configure the GCP project and authentication details | |
| # Replace <PROJECT_ID> and <SERVICE_ACCOUNT_KEY> with your own values | |
| variable "project_id" { | |
| default = "<PROJECT_ID>" | 
  
    
      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
    
  
  
    
  | sudo apt-get install \ | |
| apt-transport-https \ | |
| ca-certificates \ | |
| curl \ | |
| gnupg-agent \ | |
| software-properties-common -y | |
| curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - | |
| sudo add-apt-repository \ | |
| "deb [arch=amd64] https://download.docker.com/linux/ubuntu \ | |
| $(lsb_release -cs) \ | 
  
    
      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
    
  
  
    
  | #!/usr/bin/env python3 | |
| import sys, webbrowser, pyperclip | |
| if len(sys.argv) > 1: | |
| address = ' '.join(sys.argv[1:]) | |
| else: | |
| address = pyperclip.paste() | |
| webbrowser.open(f'https://google.com/maps/place/{address}') | 
  
    
      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 sys, pyperclip, shelve, json | |
| mcbShelf = shelve.open('mcb') | |
| #SaveClipBoardContent | |
| if len(sys.argv) == 3 and sys.argv[1].lower() == 'save': | |
| print(f'"{pyperclip.paste()}" saved in the multi clipboard!') | 
  
    
      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 re, pyperclip | |
| def extract_date(date): | |
| valid_dates = [] | |
| invalid_dates = [] | |
| for i in date: | |
| day = i[0] | 
  
    
      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 printTable(tableData): | |
| colWidth = [0] * len(tableData) #create a list with columns equal to the number of nested lists | |
| numCols = 0 | |
| numRows = 0 | |
| for lists in range(len(tableData)): | |
| longest_string = max(tableData[lists], key=len) #find the longest string in each of the lists | |
| colWidth[lists] = len(longest_string) | |
| numRows = len(tableData[lists]) #this is a bottleneck of the script, it stores the length of the last nested list, so if previous lists have less number of elements, an error is thrown | 
  
    
      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 lstfunc(lst): | |
| #Seperate the list into two parts, firstpart goes from first element to the second last element | |
| #lastpart covers the penultimate and the ultimate part of the list | |
| #use map() to convert all values to strings otherwise it will throw errors on int items | |
| firstpart = map(str,lst[:-2]) | |
| lastpart = map(str, lst[-2:]) | |
| #join the list elements with ', ' and end with ', ' to cover the last item of the firstpart | |
| print(', '.join(firstpart), end=', ') | |
| print(' and '.join(lastpart)) | 
  
    
      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
    
  
  
    
  | #include <stdio.h> | |
| #include <stdlib.h> | |
| void BFS(int src); | |
| void DFS(int n, int s[10]); | |
| int a[10][10], n,i,j; | |
| void main() | |
| { | 
  
    
      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
    
  
  
    
  | #define SIZE 50 | |
| #include <stdio.h> | |
| #include <ctype.h> | |
| char stack[SIZE]; | |
| int top=-1; | |
| push(char elem) | |
| { | |
| stack[++top]=elem; | 
NewerOlder