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, Inject } from '@angular/core'; | |
import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog'; | |
import { ModalActionsService } from 'src/app/services/modal-actions.service'; | |
@Component({ | |
selector: 'app-modal', | |
templateUrl: './modal.component.html', | |
styleUrls: ['./modal.component.css'] | |
}) | |
export class ModalComponent implements OnInit { |
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 { Injectable } from '@angular/core'; | |
@Injectable({ | |
providedIn: 'root' | |
}) | |
export class MockServ1Service { | |
constructor() { } | |
alertLogout(modalData: any) { |
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 { Injectable } from '@angular/core'; | |
@Injectable({ | |
providedIn: 'root' | |
}) | |
export class MockServ2Service { | |
constructor() { } | |
alertDelete(modalData: any) { |
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 { Injectable } from '@angular/core'; | |
import { MockServ1Service } from './mock-serv-1.service'; | |
import { MockServ2Service } from './mock-serv-2.service'; | |
@Injectable({ | |
providedIn: 'root' | |
}) | |
export class ModalActionsService { | |
constructor( |
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
# https://github.com/sivel/speedtest-cli | |
import speedtest as st | |
import pandas as pd | |
from datetime import datetime | |
def get_new_speeds(): | |
speed_test = st.Speedtest() | |
speed_test.get_best_server() |
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 matplotlib import pyplot as plt | |
nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] | |
doubles = [2, 4, 6, 8, 10, 12, 14, 16, 18, 20] | |
squares = [1, 4, 9, 16, 25, 36, 49, 64, 81, 100] | |
plt.plot(nums, doubles, label="Doubles", color="red") | |
plt.plot(nums, squares, label="Squares", color="blue") | |
plt.xlabel("Number") |
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 matplotlib import pyplot as plt | |
x_coords = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20] | |
fav_nums = [9, 37, 45, 32, 46, 56, 28, 9, 16, 68, 64, 100, 25, 1, 59, 50, 31, 96, 13, 76] | |
plt.scatter(x_coords, fav_nums, marker="x", color="red") | |
plt.ylabel("Favorite number") | |
plt.xticks([]) | |
plt.title("Favorite number of twenty individuals") |
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 matplotlib import pyplot as plt | |
slices = [1, 9, 3, 3, 4] | |
labels = ["Management", "Sales", "Quality Assurance", "Accounting", "Human Resources"] | |
colors = ["#ff9999", "#66b3ff", "#99ff99", "#ffcc99", "#cccccc"] | |
plt.pie(slices, labels=labels, colors=colors, autopct="%1.2f%%") | |
plt.title("Size of departments at Company A") | |
plt.tight_layout() |
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 matplotlib import pyplot as plt | |
pairs_owned = [16, 9, 9, 6] | |
options = ["One", "Two", "Three", "Four+"] | |
plt.bar(options, pairs_owned) | |
plt.title("Years of experience working with Python (n=40)") | |
plt.ylabel("Number of respondents") | |
plt.tight_layout() |
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 matplotlib import pyplot as plt | |
pairs_owned = [16, 9, 9, 6] | |
options = ["One", "Two", "Three", "Four+"] | |
plt.barh(options, pairs_owned) | |
plt.title("Years of experience working with Python (n=40)") | |
plt.xlabel("Number of respondents") | |
plt.tight_layout() |