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 pandas as pd | |
import openpyxl as pxl | |
# DataFrame to be inserted in the first worksheet | |
firstMockData = { | |
'a': [1,2], | |
'b': [3,4] | |
} | |
firstMockDF = pd.DataFrame(firstMockData) |
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 requests | |
from PIL import Image | |
from io import BytesIO | |
# Target image URL | |
url = "https://i.imgur.com/EdAGGFS.jpg" | |
# Get the text after the last slash in the URL, that is, the file name,\ | |
# which includes its extension | |
file_name = url.split("/")[-1] |
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
from PIL import Image, ImageDraw, ImageFont | |
from textwrap import wrap | |
# Constants | |
# ----------------------------------------------------------------------------- | |
# Set the font to be used | |
FONT_USER_INFO = ImageFont.truetype("arial.ttf", 90, encoding="utf-8") | |
FONT_TEXT = ImageFont.truetype("arial.ttf", 110, encoding="utf-8") | |
# Image dimensions (pixels) | |
WIDTH = 2376 |
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
<main id="logout-button-holder"> | |
<button mat-raised-button id="logout-button" (click)="openModal()">Logout</button> | |
</main> |
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
#logout-button { | |
color: white; | |
background-color: #4b4b4b; | |
border: 1px solid black; | |
} |
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
html, body { | |
height: 100%; | |
} | |
body { | |
margin: 0; | |
font-family: Arial, Helvetica, sans-serif; | |
display: grid; | |
justify-items: center; | |
align-items: center; |
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 { Component } from '@angular/core'; | |
import { MatDialog, MatDialogConfig } from '@angular/material/dialog'; | |
import { ModalComponent } from './modal/modal.component'; | |
@Component({ | |
selector: 'app-root', | |
templateUrl: './app.component.html', | |
styleUrls: ['./app.component.css'] | |
}) |
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
<div id="modal-content-wrapper"> | |
<header id="modal-header"> | |
<h1 id="modal-title">Are you sure you want to logout?</h1> | |
</header> | |
<section id="modal-body"> | |
<p>If you logout bad things might happen, but don't mind me, I'm just the description in a modal...</p> | |
</section> | |
<footer id="modal-footer"> | |
<button mat-raised-button id="modal-action-button" (click)="actionFunction()">Logout</button> | |
<button mat-raised-button id="modal-cancel-button" (click)="closeModal()">Go back</button> |
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
#modal-content-wrapper { | |
width: 100%; | |
height: 100%; | |
display: grid; | |
grid-template-rows: repeat(1fr, 3); | |
} | |
#modal-title { | |
font-size: 22px; | |
} |
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 { Component, OnInit } from '@angular/core'; | |
import { MatDialogRef } from '@angular/material/dialog'; | |
@Component({ | |
selector: 'app-modal', | |
templateUrl: './modal.component.html', | |
styleUrls: ['./modal.component.css'] | |
}) |
OlderNewer