This file contains 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 boto3 | |
import csv | |
def check_ec2_without_tag(tags_key_to_search, session): | |
# Initialize the EC2 client using the provided session | |
ec2_client = session.client('ec2') | |
# Define a dictionary to store instances without the given tag | |
instances_without_tag = [] |
This file contains 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 boto3 | |
import csv | |
def list_accounts_in_organization(): | |
# Initialize the Organizations client | |
org_client = boto3.client('organizations') | |
accounts = [] | |
# Pagination loop |
This file contains 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 boto3 | |
import csv | |
def list_unencrypted_volumes(session): | |
# Initialize the EC2 client using the provided session | |
ec2_client = session.client('ec2') | |
unencrypted_volumes = [] | |
next_token = None |
This file contains 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
package main | |
import ( | |
"fmt" | |
) | |
func f1(x int) (int, string) { | |
return x + 1, fmt.Sprintf("%d+1", x) |
This file contains 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
#const max_singer = 5. | |
#const max_baudi = 100. | |
singer(marco_mengoni,35,1,2,0,1,26). | |
singer(giorgia,40,0,0,0,2,25). | |
singer(ultimo,40,2,0,0,0,27). | |
singer(lazza,110,1,0,0,1,22). | |
singer(elodie,90,0,0,0,2,24). | |
singer(madame,110,0,1,0,1,22). | |
singer(colapesce_dimartino,150,1,0,0,1,20). |
This file contains 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
/* appearance */ | |
static const char font[] = "-*-terminus-medium-r-*-*-16-*-*-*-*-*-*-*"; | |
static const char normbordercolor[] = "#444444"; | |
static const char normbgcolor[] = "#151515"; | |
static const char normfgcolor[] = "#aaaaaa"; | |
static const char selbordercolor[] = "#151515"; | |
static const char selbgcolor[] = "#151515"; | |
static const char selfgcolor[] = "#ff8c00"; | |
static const unsigned int gappx = 2; | |
static const unsigned int borderpx = 1; /* border pixel of windows */ |
This file contains 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
const Slack = require("slack-node"); | |
// Load the AWS SDK for Node.js | |
const AWS = require("aws-sdk"); | |
// Set the region | |
AWS.config.update({region: process.env.REGION}); | |
// Create EC2 service object | |
var ec2 = new AWS.EC2(); | |
function capitalizeFirstLetter(string) { |
This file contains 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 boto3 | |
import json | |
import re | |
import requests | |
from bs4 import BeautifulSoup | |
from pathlib import Path | |
BASE_URL = "YOUR_BASE_URL" | |
CONTENT_BUCKET = "YOUR_BUCKET_NAME" |
This file contains 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 "qelib1.inc"; | |
// ALICE CODE | |
// create a 3 qubit register | |
qreg q[3]; | |
// create a 3 single qubit register | |
creg c0[1]; | |
creg c1[1]; | |
creg c2[1]; |
This file contains 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
const AWS = require('aws-sdk'); | |
const Slack = require("slack-node"); | |
AWS.config.region = process.env.REGION; | |
const lambda = new AWS.Lambda(); | |
// #################################################### | |
// ################# SECURITY CHECK ################### | |
// #################################################### | |
// check if slack token is equal to env var |
NewerOlder