numplot 0.0.6__tar.gz → 0.0.8__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: numplot
3
- Version: 0.0.6
3
+ Version: 0.0.8
4
4
  Summary: Extension for math
5
5
  Home-page: https://github.com/EgorZhizhlo/TASK_CONTROL
6
6
  Author: amogusbazed
@@ -13,7 +13,6 @@ Classifier: Operating System :: OS Independent
13
13
  Requires-Python: >=3.6
14
14
  Description-Content-Type: text/markdown
15
15
  Requires-Dist: requests>=2.25.1
16
- Requires-Dist: openai>=0.28.0
17
16
  Dynamic: author
18
17
  Dynamic: author-email
19
18
  Dynamic: classifier
@@ -10,7 +10,7 @@ __all__ = ['t_1', 't_2', 't_3', 't_4', 't_5_1', 't_5_2', 't_5_3']
10
10
 
11
11
  def h():
12
12
  text = """
13
- t_1 (1, 2)
13
+ t_1 (1, 2, 3)
14
14
  t_2 (1, 2)
15
15
  t_3
16
16
  t_4
@@ -1,28 +1,3 @@
1
- """import openai
2
-
3
-
4
- class GPTClient:
5
- def __init__(self, api_key: str, model: str = "gpt-3.5-turbo-instruct-0914"):
6
- self.api_key = api_key
7
- self.model = model
8
- openai.api_key = self.api_key
9
-
10
- def send_request(self, prompt: str, max_tokens: int = 100, temperature: float = 0.7):
11
- try:
12
- response = openai.ChatCompletion.create(
13
- model=self.model,
14
- messages=[
15
- {"role": "system", "content": "You are a helpful assistant."},
16
- {"role": "user", "content": prompt}
17
- ],
18
- max_tokens=max_tokens,
19
- temperature=temperature,
20
- )
21
- return response["choices"][0]["message"]["content"].strip()
22
- except Exception as e:
23
- return f"Ошибка при запросе: {str(e)}"
24
- """
25
-
26
1
  def t_1(var=1, prompt=""):
27
2
  if var == 1:
28
3
  text = """
@@ -61,7 +36,16 @@ def t_1(var=1, prompt=""):
61
36
  print("Стандартное отклонение σX", round(std_dev_X.evalf(), 3))
62
37
  print("Квантиль уровня 0.9", round(quantile_90, 3))")"""
63
38
  if var == 2:
64
- text = """2. import sympy as sp
39
+ text = """2.
40
+ Запишите условие нормировки: ∫∫_D f(x, y) dx dy = 1.
41
+ Подставьте выражение для плотности f(x, y) и определите пределы интегрирования.
42
+ Вычислите внутренний интеграл по одной из переменных (например, по y).
43
+ Затем вычислите внешний интеграл по оставшейся переменной (например, по x).
44
+ Установите равенство к 1 и решите уравнение для нахождения константы C.
45
+ Определите, какую вероятность необходимо найти (например, P(X > a) или P(Y < b)).
46
+ Запишите соответствующий интеграл: P(X > a) = ∫_a^∞ ∫_c^d f(x, y) dy dx, где [a, b] и [c, d] — это пределы интегрирования для переменных x и y.
47
+ Полученное значение будет искомой вероятностью.
48
+ import sympy as sp
65
49
  def compute_probability_and_constant(f, x_limits, y_limits, a):
66
50
  Вычисляет нормирующую константу C и вероятность P(X > a) для заданной функции плотности.
67
51
 
@@ -113,8 +97,37 @@ def t_1(var=1, prompt=""):
113
97
  print(f"Найдена константа C: {C_value}")
114
98
  print(f"P(X > {a}): {probability}")
115
99
  """
116
- # if var == 30:
117
- # API_KEY = "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"
118
- # gpt_client = GPTClient(api_key=API_KEY)
119
- # text = gpt_client.send_request(prompt=prompt)"""
100
+ if var == 3:
101
+ text = """
102
+ Количество опоздавших на самолет пассажиров для каждого рейса описывается случайной величиной Х, распределенной по закону Пуассона с параметром А = 4.
103
+ При этом стоимость билета, который не подлежит возврату, описывается нормально
104
+ распределенной случайной величиной У с параметрами m=4300 и o=133.2.
105
+ Вычислите среднюю сумму стоимости пропавших билетов и её
106
+ среднеквадратическое отклонение, приходящиеся на каждый рейс
107
+ Дано:
108
+ Количество опоздавших пассажиров X ~ Poisson(λ = 4)
109
+ Стоимость билета Y ~ N(4300, 133.2^2)
110
+
111
+ Решение:
112
+
113
+ 1. Математическое ожидание суммы стоимости пропавших билетов:
114
+ E(S) = E(X) * E(Y)
115
+ E(X) = λ = 4
116
+ E(Y) = 4300
117
+ E(S) = 4 * 4300 = 17200
118
+
119
+ 2. Дисперсия суммы стоимости пропавших билетов:
120
+ Var(S) = E(X) * Var(Y) + (E(Y))^2 * Var(X)
121
+ Var(X) = λ = 4
122
+ Var(Y) = 133.2^2 = 17733.44
123
+ Var(S) = 4 * 17733.44 + 4300^2 * 4
124
+ Var(S) = 70933.76 + 73960000 = 74030933.76
125
+
126
+ 3. Среднеквадратическое отклонение суммы стоимости пропавших билетов:
127
+ σ(S) = sqrt(Var(S)) = sqrt(74030933.76) ≈ 8602.97
128
+
129
+ Ответ:
130
+ Средняя сумма стоимости пропавших билетов: 17200
131
+ Среднеквадратическое отклонение: 8602.97
132
+ """
120
133
  return text
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: numplot
3
- Version: 0.0.6
3
+ Version: 0.0.8
4
4
  Summary: Extension for math
5
5
  Home-page: https://github.com/EgorZhizhlo/TASK_CONTROL
6
6
  Author: amogusbazed
@@ -13,7 +13,6 @@ Classifier: Operating System :: OS Independent
13
13
  Requires-Python: >=3.6
14
14
  Description-Content-Type: text/markdown
15
15
  Requires-Dist: requests>=2.25.1
16
- Requires-Dist: openai>=0.28.0
17
16
  Dynamic: author
18
17
  Dynamic: author-email
19
18
  Dynamic: classifier
@@ -1,2 +1 @@
1
1
  requests>=2.25.1
2
- openai>=0.28.0
@@ -8,7 +8,7 @@ def readme():
8
8
 
9
9
  setup(
10
10
  name='numplot',
11
- version='0.0.6',
11
+ version='0.0.8',
12
12
  author='amogusbazed',
13
13
  author_email='amogusbazed@gmail.com',
14
14
  description='Extension for math',
@@ -16,7 +16,7 @@ setup(
16
16
  long_description_content_type='text/markdown',
17
17
  url='https://github.com/EgorZhizhlo/TASK_CONTROL',
18
18
  packages=find_packages(),
19
- install_requires=['requests>=2.25.1','openai>=0.28.0'],
19
+ install_requires=['requests>=2.25.1'],
20
20
  classifiers=[
21
21
  'Programming Language :: Python :: 3.13',
22
22
  'License :: OSI Approved :: MIT License',
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes