Python

Permanently deleting objects from a s3 bucket that has versioning enabled – not so straight forward

Do NOT use this procedure if you have files in your versioning enabled bucket that you want to keep. The following procedure will permanently delete all files and versions in a bucket. It was written to be run from Linux/Bash and it assume python3 is installed, and the boto3 package is installed remove-all-versions.bash #! /bin/bash …

Permanently deleting objects from a s3 bucket that has versioning enabled – not so straight forward Read More »

generate browser automation code (python & selenium) automatically with Katalon Recorder

go to chrome webstore – install katalon recorder start katalon recorder by selecting it in the active extensions icon start recording run your browser manually stop recording export to python 2 there is actually a “Katalon Studio” that can be used for free as well with even more features and the Katalon Recorder Chrome extension. …

generate browser automation code (python & selenium) automatically with Katalon Recorder Read More »

Python – Getting all the methods available to a data type

>>> myStuff = ‘Hello world’ >>> type(myStuff) <class ‘str’> >>> dir(myStuff) [‘capitalize’, ‘casefold’, ‘center’, ‘count’, ‘encode’, ‘endswith’, ‘expandtabs’, ‘find’, ‘format’, ‘format_map’, ‘index’, ‘isalnum’, ‘isalpha’, ‘isdecimal’, ‘isdigit’, ‘isidentifier’, ‘islower’, ‘isnumeric’, ‘isprintable’, ‘isspace’, ‘istitle’, ‘isupper’, ‘join’, ‘ljust’, ‘lower’, ‘lstrip’, ‘maketrans’, ‘partition’, ‘replace’, ‘rfind’, ‘rindex’, ‘rjust’, ‘rpartition’, ‘rsplit’, ‘rstrip’, ‘split’, ‘splitlines’, ‘startswith’, ‘strip’, ‘swapcase’, ‘title’, ‘translate’, ‘upper’, ‘zfill’] >>> help(str.capitalize)  

Installing python 3.6 on rhel 6 or 7 and compatibles

Prerequisites RHEL 6 or 7 server up and running Sudo or root priviledged user Install the necessary utilities Make sure you have the prerequisites sudo yum update sudo yum install yum-utils sudo yum groupinstall development Install Python 3.6 The standard yum repositories does not the latest Python release (as of this writing), so lets install an additional repository, called …

Installing python 3.6 on rhel 6 or 7 and compatibles Read More »