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
'''Licensed under the MIT License :)''' | |
import pefile | |
import pprint | |
pe = pefile.PE('example.exe') | |
string_version_info = {} | |
for fileinfo in pe.FileInfo[0]: |
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
class Solution: | |
def lastRemaining(self, n): | |
""" | |
:type n: int | |
:rtype: int | |
""" | |
odd = True | |
remainder = n | |
startNum = 1 | |
power = 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
import boto3 | |
import time | |
region = 'eu-west-1' | |
user_data_script = """#!/bin/bash | |
instanceid=$(curl http://169.254.169.254/latest/meta-data/instance-id) | |
cd / | |
mkdir moodledata | |
mount -t nfs4 -o nfsvers=4.1,rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2 fs-xxxxxxxxxxc.efs.eu-west-1.amazonaws.com:/ moodledata | |
tar czf mooodledata-backup-$(date +%d-%m-%Y_%H-%M).tar.gz /moodledata | |
aws s3 mv mooodledata-backup-*.tar.gz s3://xxxxxxxxx/ |
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
template = ''' | |
Resources: | |
LambdaLogGroup1234: | |
Type: "AWS::Logs::LogGroup" | |
Properties: | |
LogGroupName: !Join [ "", [ "/aws/lambda/", !Ref "AWS::StackName", "1234" ] ] | |
LambdaLogGroup: | |
Type: "AWS::Logs::LogGroup" | |
Properties: |