import os
import pandas as pd
# define aws credentials by os enviroment variables
os.environ['AWS_ACCESS_KEY_ID'] = '...'
os.environ['AWS_SECRET_ACCESS_KEY'] = '...'
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 Parent1: | |
def parent1_method(self): | |
return "Method from Parent1 class" | |
class Parent2: | |
def parent2_method(self): | |
return "Method from Parent2 class" | |
class Child: | |
def __init__(self, parent_class): |
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
from typing import Any | |
class WorkflowSkip(Exception): | |
... | |
class WorkflowProcess: | |
workflow_steps = () |
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 re | |
if re.match(r'^/tmp/(?!.*/$).*$', file_path): | |
os.remove(file_path) |
echo -e "#!/bin/bash
#
echo 'This is my script'" > my-script
sudo install my-script /usr/local/bin
Always I forget how to set Linux swap so there it is
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
#!/bin/bash | |
# Variables to store argument values | |
ARG1="" | |
ARG2="" | |
# Function to display the error message and exit the script | |
function usage_error { | |
echo "Usage: $0 --argument_1=\"<text>\" --argument_2=\"<text>\"" | |
echo "Error: $1" |
NewerOlder