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
<?xml version="1.0" encoding="UTF-8"?> | |
<CLISH_MODULE xmlns="http://clish.sourceforge.net/XMLSchema" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://clish.sourceforge.net/XMLSchema | |
http://clish.sourceforge.net/XMLSchema/clish.xsd"> | |
<!--=======================================================--> | |
<PTYPE name="STRING" | |
pattern="[^\-]+" | |
help="String"/> |
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 unittest | |
class SequentialTestCaseLoader(unittest.TestLoader): | |
""" | |
The python's unittest library executes the tests in alphabetical order | |
to override this behaviour and execute tests in (defined) order. | |
Use `unittest.main(testLoader=SequentialTestCaseLoader())` to | |
the trigger execution. | |
""" | |
def getTestCaseNames(self, tcCls): |
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 list_objects( | |
bucket_name: str, folder_name: str | |
) -> None: | |
""" This function takes a S3 bucket name and optionally folder name | |
and returns a sorted list of objects inside S3 | |
Args: | |
bucket_name ([string]): Name of the S3 bucket | |
folder_name ([string]): Sub folder inside S3 (optional) | |
""" |
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
session = Session() | |
# Explicitly mention the tables having foreign key then concrete classes. | |
tables = [UserEmail, UserPermission, User, GroupPermission, Permission, Role, GroupMember, Group] | |
for table in tables: | |
session.query(table).delete() | |
session.commit() | |
print(table, 'data deleted') |
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 datetime as dt | |
from sqlalchemy import Column, Integer, DateTime | |
from sqlalchemy.engine import create_engine | |
from sqlalchemy.orm import sessionmaker | |
from sqlalchemy.ext.declarative import declared_attr, declarative_base | |
from db.config import SQLA_URL | |
engine = create_engine(SQLA_URL, echo=True) |
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
# Path to your oh-my-zsh configuration. | |
export ZSH=$HOME/.oh-my-zsh | |
# Set name of the theme to load. | |
# Look in ~/.oh-my-zsh/themes/ | |
# Optionally, if you set this to "random", it'll load a random theme each | |
# time that oh-my-zsh is loaded. | |
#export ZSH_THEME="robbyrussell" | |
export ZSH_THEME="gnzh" |
NewerOlder