Skip to content

Instantly share code, notes, and snippets.

View sualeh's full-sized avatar
⚠️
404 Not Found

Sualeh Fatehi sualeh

⚠️
404 Not Found
View GitHub Profile
"""Test for lab module."""
from unittest import TestCase
from schedule import Schedule
from unittest import skip
class TestLab3ForGrading(TestCase):
"""Test for Lab 3."""
def test_schedule_happy_path(self):
@sualeh
sualeh / README.md
Last active February 24, 2025 11:09
Create Nice-looking Schema Diagrams in PlantUML

Create Nice-looking Schema Diagrams in PlantUML

PlantUML is a descriptive language to generate a number of types of software diagrams, such as sequence, class, deployment and state diagrams, and many others. PlantUML does not generate very good-looking schema diagrams out of the box, but it supports themes and preprocessed macros. If you use themes and macros, you can not only use a simplified syntax, but also generate beautiful diagrams.

Here is an example of a PlantUML schema diagram, and we will build up the code to generate it.

Schema diagram

To start, describe your schemas, tables and columns using this syntax as an example.

@sualeh
sualeh / ApiExampleAthena.java
Created April 22, 2023 12:48
SchemaCrawler example code for AWS Athena
package com.example;
import java.sql.Connection;
import java.util.logging.Level;
import schemacrawler.crawl.ConnectionInfoBuilder;
import schemacrawler.schema.Catalog;
import schemacrawler.schema.Column;
import schemacrawler.schema.Schema;
import schemacrawler.schema.Table;
import schemacrawler.schemacrawler.LimitOptionsBuilder;
@sualeh
sualeh / SchemaCrawlerDiagramGenerator.java
Created May 3, 2023 20:06
Generate Schema Diagrams with SchemaCrawler
package de.dpma.azubi.markenschema.schemacrawler;
import static us.fatehi.utility.Utility.isBlank;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.HashMap;
import java.util.Map;
import java.util.logging.Level;
@sualeh
sualeh / Main.java
Created September 27, 2023 22:19 — forked from Whatshiywl/Main.java
SchemaCrawler API serialize
package foo.bar;
import java.nio.file.Paths;
import java.util.logging.Level;
import schemacrawler.schemacrawler.LimitOptionsBuilder;
import schemacrawler.schemacrawler.LoadOptionsBuilder;
import schemacrawler.schemacrawler.SchemaCrawlerOptions;
import schemacrawler.schemacrawler.SchemaCrawlerOptionsBuilder;
import schemacrawler.schemacrawler.SchemaInfoLevelBuilder;
@sualeh
sualeh / python_class.ipynb
Last active June 25, 2024 03:03
python_class.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@sualeh
sualeh / extract_and_rename.ps1
Last active June 30, 2024 12:37
Extracts raw text from Amazon TextTract zip files
Add-Type -Assembly System.IO.Compression.FileSystem
# Define the path to your ZIP files
$ZipFilesPath = "."
# Create a temporary folder for extraction
$TempPath = "."
# Extract files from ZIPs and rename them
$Shell = New-Object -com Shell.Application
@sualeh
sualeh / create_and_download_spreadsheet.ipynb
Last active July 31, 2024 22:09
create_and_download_spreadsheet.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.