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 random | |
def generate_employee_reporting(num_employees=10): | |
employees = [f"Employee_{i}" for i in range(num_employees)] | |
reporting = [] | |
for i in range(1, num_employees): | |
manager = random.choice(employees[:i]) | |
reporting.append((manager, employees[i])) |
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 random | |
def generate_city_transport_network(num_stations=10, num_routes=15): | |
stations = [f"Station_{i}" for i in range(num_stations)] | |
routes = [] | |
for _ in range(num_routes): | |
station1, station2 = random.sample(stations, 2) | |
routes.append((station1, station2)) |
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 random | |
# Define departments and create a sample hierarchy | |
departments = [ | |
'Executive', 'Finance', 'HR', 'IT', 'Marketing', 'Sales', 'Engineering', | |
'Customer Service', 'Product Development', 'Legal', 'Operations', 'R&D' | |
] | |
# Generate random hierarchy relationships |
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 random | |
# Define departments and projects | |
departments = ['HR', 'Engineering', 'Sales', 'Finance', 'Marketing', 'IT'] | |
projects = [f'Project {chr(65 + i)}' for i in range(20)] # Creates projects A to T | |
# Generate random department-project associations | |
data = [] | |
for project in projects: |
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 plot_vectors(vectors, title=None): | |
import numpy as np | |
from matplotlib import pyplot as plt | |
# Initiate the plot | |
fig, ax = plt.subplots(figsize = (5,5)) | |
# Draw each vector as quiver plot | |
for x_cor, y_cor in vectors: | |
ax.quiver(0,0,x_cor,y_cor, | |
scale=1,angles='xy', |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<script async src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script> | |
<title>MathJax</title> | |
<style> | |
.container{ | |
max-width: 900px; | |
margin:0 auto; |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<script async src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script> | |
<title>MathJax</title> | |
</head> | |
<body> | |
<div class="container"> | |
$$ x = -b \pm \frac{\sqrt{b^2 - 4ac}}{2a}$$ | |
</div> |
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
CREATE TABLE IF NOT EXISTS `country` ( | |
`id` int(11) NOT NULL AUTO_INCREMENT, | |
`iso` char(2) NOT NULL, | |
`name` varchar(80) NOT NULL, | |
`nicename` varchar(80) NOT NULL, | |
`iso3` char(3) DEFAULT NULL, | |
`numcode` smallint(6) DEFAULT NULL, | |
`phonecode` int(5) NOT NULL, | |
PRIMARY KEY (`id`) | |
) ENGINE=MyISAM DEFAULT CHARSET=latin1; |