<jupyter_start><jupyter_text>Parabola<jupyter_code>import numpy as np
import matplotlib.pyplot as plt
from matplotlib import cm
from mpl_toolkits.mplot3d import Axes3D

fig = plt.figure(figsize=(10, 10), dpi= 80)
ax = fig.gca(projection='3d')

# Make data.
X = np.arange(0, 10, .1)
Y = np.arange(0, 10, .1)
X, Y = np.meshgrid(X, Y)
Z = np.sqrt((X-5)**2 + (Y-5)**2)

# Plot the surface.
surf = ax.plot_surface(X, Y, Z, cmap=cm.plasma,
                       linewidth=0, antialiased=False)

# Turn off tick labels
ax.set_yticklabels([])
ax.set_xticklabels([])

# Customize the z axis.
# ax.set_zlim(-1.01, 1.01)
# ax.zaxis.set_major_locator(LinearLocator(10))
# ax.zaxis.set_major_formatter(FormatStrFormatter('%.02f'))

plt.show()
new_fig, ax = plt.subplots(1)
ax.contour(X,Y,Z, 20, cmap=cm.plasma)

ax.set_aspect('equal')

# Turn off tick labels
ax.set_yticklabels([])
ax.set_xticklabels([])

plt.show()<jupyter_output><empty_output><jupyter_text>Probability<jupyter_code>import numpy as np
import matplotlib.pyplot as plt
import scipy.stats as stats

mu1 = 0
mu2 = -1
sigma = 1

# pdfs
x = np.linspace(mu2 - 3*sigma, mu1 + 3*sigma, 150)
y1 = stats.norm.pdf(x, mu1, sigma)
y2 = stats.norm.pdf(x, mu2, sigma)

fig, ax = plt.subplots(1)

# configure axes
ax.set_yticklabels([])
ax.set_xticklabels([])

# plot pdfs
ax.plot(x, y1)
ax.plot(x, y2)

# plot vertical lines
ax.plot([mu2,mu2], [0, stats.norm.pdf(mu2, mu1, sigma)])
ax.plot([mu1,mu1], [0, stats.norm.pdf(mu1, mu2, sigma)])
ax.hlines(y=stats.norm.pdf(mu1, mu2, sigma), xmin=mu2 - 3*sigma, xmax=mu1 + 3*sigma, linestyles='dashed')

plt.show()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.17086662569145666, 'fraction_numerical': 0.0430239704978488, 'mean_word_length': 4.856115107913669, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '291272', 'license': 'BSD-2-Clause-FreeBSD', 'n_tokens_mistral': 760, 'n_tokens_neox': 724, 'n_words': 146, 'path': 'assign2/md_img/triangulation_plots.ipynb', 'repo_name': 'LukacsHunor/python-assignments', 'size': '1627'}