29 May 2024
import numpy as np
import matplotlib.pyplot as plt
from matplotlib.patches import Circle, RegularPolygon
from matplotlib.path import Path
from matplotlib.projections.polar import PolarAxes
from matplotlib.projections import register_projection
from matplotlib.spines import Spine
from matplotlib.transforms import Affine2D
def radar_factory(num_vars, frame='circle'):
"""Create a radar chart with num_vars axes.
This function creates a RadarAxes projection and registers it.
Parameters
----------
num_vars : int
Number of variables for radar chart.
frame : {'circle' | 'polygon'}
Shape of frame surrounding axes.
"""
# calculate evenly-spaced axis angles
theta = np.linspace(0, 2*np.pi, num_vars, endpoint=False)
class RadarAxes(PolarAxes):
name = 'radar'
def init(self, *args, **kwargs):
super().init(*args, **kwargs)
# rotate plot such that the first axis is at the top
self.set_theta_zero_location('N')
def fill(self, *args, closed=True, **kwargs):
"""Override fill so that line is closed by default"""
return super().fill(closed=closed, *args, **kwargs)
def plot(self, *args, **kwargs):
"""Override plot so that line is closed by default"""
lines = super().plot(*args, **kwargs)
for line in lines:
self._close_line(line)
def _close_line(self, line):
x, y = line.get_data()
# FIXME: markers at x[0], y[0] get doubled-up
if x[0] != x[-1]:
x = np.concatenate((x, [x[0]]))
y = np.concatenate((y, [y[0]]))
line.set_data(x, y)
def set_varlabels(self, labels):
self.set_thetagrids(np.degrees(theta), labels)
def _gen_axes_patch(self):
# The Axes patch must be centered at (0.5, 0.5) and of radius 0.5
# in axes coordinates.
if frame
spoke_labels = data.pop(0)
title, case_data = data[0]
fig, ax = plt.subplots(figsize=(6, 6), subplot_kw=dict(projection='radar'))
fig.subplots_adjust(top=0.85, bottom=0.05)
ax.set_rgrids([0.2, 0.4, 0.6, 0.8])
ax.set_title(title, position=(0.5, 1.1), ha='center')
for d in case_data:
line = ax.plot(theta, d)
ax.fill(theta, d, alpha=0.25)
ax.set_varlabels(spoke_labels)
plt . show()
import numpy as np
import matplotlib.pyplot as plt
from matplotlib.patches import Circle, RegularPolygon
from matplotlib.path import Path
from matplotlib.projections.polar import PolarAxes
from matplotlib.projections import register_projection
from matplotlib.spines import Spine
from matplotlib.transforms import Affine2D
def radar_factory(num_vars, frame='circle'):
"""Create a radar chart with num_vars axes.
This function creates a RadarAxes projection and registers it.
Parameters
----------
num_vars : int
Number of variables for radar chart.
frame : {'circle' | 'polygon'}
Shape of frame surrounding axes.
"""
# calculate evenly-spaced axis angles
theta = np.linspace(0, 2*np.pi, num_vars, endpoint=False)
class RadarAxes(PolarAxes):
name = 'radar'
def init(self, *args, **kwargs):
super().init(*args, **kwargs)
# rotate plot such that the first axis is at the top
self.set_theta_zero_location('N')
def fill(self, *args, closed=True, **kwargs):
"""Override fill so that line is closed by default"""
return super().fill(closed=closed, *args, **kwargs)
def plot(self, *args, **kwargs):
"""Override plot so that line is closed by default"""
lines = super().plot(*args, **kwargs)
for line in lines:
self._close_line(line)
def _close_line(self, line):
x, y = line.get_data()
# FIXME: markers at x[0], y[0] get doubled-up
if x[0] != x[-1]:
x = np.concatenate((x, [x[0]]))
y = np.concatenate((y, [y[0]]))
line.set_data(x, y)
def set_varlabels(self, labels):
self.set_thetagrids(np.degrees(theta), labels)
def _gen_axes_patch(self):
# The Axes patch must be centered at (0.5, 0.5) and of radius 0.5
# in axes coordinates.
if frame
Sensitivity_Analysis['F(t)(cm)'],
Sensitivity_Analysis['t(s)'],
Sensitivity_Analysis['S(%)'],
Sensitivity_Analysis['Fa(%)'],
Sensitivity_Analysis['Rha(%)'],
Sensitivity_Analysis['Sh(cm)'],
Sensitivity_Analysis['Bd(g/cc)'],
Sensitivity_Analysis['Mc(%)']
# [0.07, 0.95, 0.04, 0.05, 0.01],
# [0.01, 0.02, 0.85, 0.19, 0.01], bayad 8ta har radif bashe
# [0.02, 0.01, 0.07, 0.01, 0.21], ???????
# [0.01, 0.01, 0.02, 0.71, 0.74
])]
N = len(data[0])
theta = radar_factory(N, frame='polygon')
spoke_labels = data.pop(0)
title, case_data = data[0]
fig, ax = plt.subplots(figsize=(6, 6), subplot_kw=dict(projection='radar'))
fig.subplots_adjust(top=0.85, bottom=0.05)
ax.set_rgrids([0.2, 0.4, 0.6, 0.8])
ax.set_title(title, position=(0.5, 1.1), ha='center')
for d in case_data:
line = ax.plot(theta, d)
ax.fill(theta, d, alpha=0.25)
ax.set_varlabels(spoke_labels)
plt . show()
30 May 2024
1 June 2024
6 June 2024
10 June 2024
11 June 2024
12 June 2024
Фотография
click to show
click to show
📽 | YouTube
🐞 بررسی آسیب پذیری XSS با جاوا اسکریپت قسمت دوم
¬ شروع برنامه نویسی جاوا اسکریپت قسمت دوم.
امروزه متاسفانه با اشتباه بسیاری از برنامه نویسان سمت وب حفره های امنیتی، زیادی رو یک وب سایت به وجود می آیند که متاسفانه یکی از شایع ترین (باگ) حفره امنیتی Cross Site Script که برای اینکه با CSS اشتباه گرفته نشود به آن XSS گفته می شود !
🖇 https://youtu.be/SAMuDdL-8P4
× #YouTube ×
〰️〰️〰️〰️〰️
- T.me/Black_Security 🎓
- Www.BlackSecurityTeam.com 🎓
29.3K · 13 June 2024
14 June 2024