We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Duckduckgo weather formatting error
**Version of SearXNG, commit number if you are using on master branch and stipulate if you forked SearXNG**
2022.10.01-901143f0

**How did you install SearXNG?**
Script
**What happened?**
Humidity formatting has floating point error, 14+ numbers after decimal. Stuff like `56.00000000000001%` and `56.99999999999999%`
**How To Reproduce**
`!ddw 12345` (or some other zip)

Scroll through results until you see error, it's fairly common

**Expected behavior**
Humidity will be formatted such as 56%, 57%, etc

**Screenshots & Logs**
![humid](https://user-images.githubusercontent.com/1284317/193945463-bebf6a7c-8f92-43b3-861c-3460d7bf15ab.png)

Duckduckgo weather formatting error
**Version of SearXNG, commit number if you are using on master branch and stipulate if you forked SearXNG**
2022.10.01-901143f0

**How did you install SearXNG?**
Script
**What happened?**
Humidity formatting has floating point error, 14+ numbers after decimal. Stuff like `56.00000000000001%` and `56.99999999999999%`
**How To Reproduce**
`!ddw 12345` (or some other zip)

Scroll through results until you see error, it's fairly common

**Expected behavior**
Humidity will be formatted such as 56%, 57%, etc

**Screenshots & Logs**
![humid](https://user-images.githubusercontent.com/1284317/193945463-bebf6a7c-8f92-43b3-861c-3460d7bf15ab.png)


--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `searx/engines/duckduckgo_weather.py`
Content:
```
1 # SPDX-License-Identifier: AGPL-3.0-or-later
2 # lint: pylint
3 """DuckDuckGo Weather"""
4 
5 from json import loads
6 from urllib.parse import quote
7 
8 from datetime import datetime
9 from flask_babel import gettext
10 
11 about = {
12     "website": 'https://duckduckgo.com/',
13     "wikidata_id": 'Q12805',
14     "official_api_documentation": None,
15     "use_official_api": True,
16     "require_api_key": False,
17     "results": "JSON",
18 }
19 
20 categories = ["others"]
21 
22 url = "https://duckduckgo.com/js/spice/forecast/{query}/{lang}"
23 
24 
25 def generate_condition_table(condition):
26     res = ""
27 
28     res += f"<tr><td><b>{gettext('Condition')}</b></td>" f"<td><b>{condition['summary']}</b></td></tr>"
29 
30     res += (
31         f"<tr><td><b>{gettext('Temperature')}</b></td>"
32         f"<td><b>{f_to_c(condition['temperature'])}°C / {condition['temperature']}°F</b></td></tr>"
33     )
34 
35     res += (
36         f"<tr><td>{gettext('Feels like')}</td><td>{f_to_c(condition['apparentTemperature'])}°C / "
37         f"{condition['apparentTemperature']}°F</td></tr>"
38     )
39 
40     res += (
41         f"<tr><td>{gettext('Wind')}</td><td>{condition['windBearing']}° — "
42         f"{'%.2f' % (condition['windSpeed'] * 1.6093440006147)} km/h / {condition['windSpeed']} mph</td></tr>"
43     )
44 
45     res += f"<tr><td>{gettext('Visibility')}</td><td>{condition['visibility']} km</td>"
46 
47     res += f"<tr><td>{gettext('Humidity')}</td><td>{condition['humidity'] * 100}%</td></tr>"
48 
49     return res
50 
51 
52 def generate_day_table(day):
53     res = ""
54 
55     res += (
56         f"<tr><td>{gettext('Min temp.')}</td><td>{f_to_c(day['temperatureLow'])}°C / "
57         f"{day['temperatureLow']}°F</td></tr>"
58     )
59     res += (
60         f"<tr><td>{gettext('Max temp.')}</td><td>{f_to_c(day['temperatureHigh'])}°C / "
61         f"{day['temperatureHigh']}°F</td></tr>"
62     )
63     res += f"<tr><td>{gettext('UV index')}</td><td>{day['uvIndex']}</td></tr>"
64     res += (
65         f"<tr><td>{gettext('Sunrise')}</td><td>{datetime.fromtimestamp(day['sunriseTime']).strftime('%H:%M')}</td></tr>"
66     )
67     res += (
68         f"<tr><td>{gettext('Sunset')}</td><td>{datetime.fromtimestamp(day['sunsetTime']).strftime('%H:%M')}</td></tr>"
69     )
70 
71     return res
72 
73 
74 def request(query, params):
75     params["url"] = url.format(query=quote(query), lang=params['language'].split('-')[0])
76 
77     return params
78 
79 
80 def f_to_c(temperature):
81     return "%.2f" % ((temperature - 32) / 1.8)
82 
83 
84 def response(resp):
85     results = []
86 
87     if resp.text.strip() == "ddg_spice_forecast();":
88         return []
89 
90     result = loads(resp.text[resp.text.find('\n') + 1 : resp.text.rfind('\n') - 2])
91 
92     current = result["currently"]
93 
94     title = result['flags']['ddg-location']
95 
96     infobox = f"<h3>{gettext('Current condition')}</h3><table><tbody>"
97 
98     infobox += generate_condition_table(current)
99 
100     infobox += "</tbody></table>"
101 
102     last_date = None
103 
104     for time in result['hourly']['data']:
105         current_time = datetime.fromtimestamp(time['time'])
106 
107         if last_date != current_time.date():
108             if last_date is not None:
109                 infobox += "</tbody></table>"
110 
111             infobox += f"<h3>{current_time.strftime('%Y-%m-%d')}</h3>"
112 
113             infobox += "<table><tbody>"
114 
115             for day in result['daily']['data']:
116                 if datetime.fromtimestamp(day['time']).date() == current_time.date():
117                     infobox += generate_day_table(day)
118 
119             infobox += "</tbody></table><table><tbody>"
120 
121         last_date = current_time.date()
122 
123         infobox += f"<tr><td rowspan=\"7\"><b>{current_time.strftime('%H:%M')}</b></td></tr>"
124 
125         infobox += generate_condition_table(time)
126 
127     infobox += "</tbody></table>"
128 
129     results.append(
130         {
131             "infobox": title,
132             "content": infobox,
133         }
134     )
135 
136     return results
137
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/searx/engines/duckduckgo_weather.py b/searx/engines/duckduckgo_weather.py
--- a/searx/engines/duckduckgo_weather.py
+++ b/searx/engines/duckduckgo_weather.py
@@ -39,12 +39,12 @@
 
     res += (
         f"<tr><td>{gettext('Wind')}</td><td>{condition['windBearing']}° — "
-        f"{'%.2f' % (condition['windSpeed'] * 1.6093440006147)} km/h / {condition['windSpeed']} mph</td></tr>"
+        f"{(condition['windSpeed'] * 1.6093440006147):.2f} km/h / {condition['windSpeed']} mph</td></tr>"
     )
 
     res += f"<tr><td>{gettext('Visibility')}</td><td>{condition['visibility']} km</td>"
 
-    res += f"<tr><td>{gettext('Humidity')}</td><td>{condition['humidity'] * 100}%</td></tr>"
+    res += f"<tr><td>{gettext('Humidity')}</td><td>{(condition['humidity'] * 100):.1f}%</td></tr>"
 
     return res

{"golden_diff": "diff --git a/searx/engines/duckduckgo_weather.py b/searx/engines/duckduckgo_weather.py\n--- a/searx/engines/duckduckgo_weather.py\n+++ b/searx/engines/duckduckgo_weather.py\n@@ -39,12 +39,12 @@\n \n     res += (\n         f\"<tr><td>{gettext('Wind')}</td><td>{condition['windBearing']}\u00b0 \u2014 \"\n-        f\"{'%.2f' % (condition['windSpeed'] * 1.6093440006147)} km/h / {condition['windSpeed']} mph</td></tr>\"\n+        f\"{(condition['windSpeed'] * 1.6093440006147):.2f} km/h / {condition['windSpeed']} mph</td></tr>\"\n     )\n \n     res += f\"<tr><td>{gettext('Visibility')}</td><td>{condition['visibility']} km</td>\"\n \n-    res += f\"<tr><td>{gettext('Humidity')}</td><td>{condition['humidity'] * 100}%</td></tr>\"\n+    res += f\"<tr><td>{gettext('Humidity')}</td><td>{(condition['humidity'] * 100):.1f}%</td></tr>\"\n \n     return res\n", "issue": "Duckduckgo weather formatting error\n**Version of SearXNG, commit number if you are using on master branch and stipulate if you forked SearXNG**\r\n2022.10.01-901143f0\r\n\r\n**How did you install SearXNG?**\r\nScript\r\n**What happened?**\r\nHumidity formatting has floating point error, 14+ numbers after decimal. Stuff like `56.00000000000001%` and `56.99999999999999%`\r\n**How To Reproduce**\r\n`!ddw 12345` (or some other zip)\r\n\r\nScroll through results until you see error, it's fairly common\r\n\r\n**Expected behavior**\r\nHumidity will be formatted such as 56%, 57%, etc\r\n\r\n**Screenshots & Logs**\r\n![humid](https://user-images.githubusercontent.com/1284317/193945463-bebf6a7c-8f92-43b3-861c-3460d7bf15ab.png)\r\n\nDuckduckgo weather formatting error\n**Version of SearXNG, commit number if you are using on master branch and stipulate if you forked SearXNG**\r\n2022.10.01-901143f0\r\n\r\n**How did you install SearXNG?**\r\nScript\r\n**What happened?**\r\nHumidity formatting has floating point error, 14+ numbers after decimal. Stuff like `56.00000000000001%` and `56.99999999999999%`\r\n**How To Reproduce**\r\n`!ddw 12345` (or some other zip)\r\n\r\nScroll through results until you see error, it's fairly common\r\n\r\n**Expected behavior**\r\nHumidity will be formatted such as 56%, 57%, etc\r\n\r\n**Screenshots & Logs**\r\n![humid](https://user-images.githubusercontent.com/1284317/193945463-bebf6a7c-8f92-43b3-861c-3460d7bf15ab.png)\r\n\n", "before_files": [{"content": "# SPDX-License-Identifier: AGPL-3.0-or-later\n# lint: pylint\n\"\"\"DuckDuckGo Weather\"\"\"\n\nfrom json import loads\nfrom urllib.parse import quote\n\nfrom datetime import datetime\nfrom flask_babel import gettext\n\nabout = {\n    \"website\": 'https://duckduckgo.com/',\n    \"wikidata_id\": 'Q12805',\n    \"official_api_documentation\": None,\n    \"use_official_api\": True,\n    \"require_api_key\": False,\n    \"results\": \"JSON\",\n}\n\ncategories = [\"others\"]\n\nurl = \"https://duckduckgo.com/js/spice/forecast/{query}/{lang}\"\n\n\ndef generate_condition_table(condition):\n    res = \"\"\n\n    res += f\"<tr><td><b>{gettext('Condition')}</b></td>\" f\"<td><b>{condition['summary']}</b></td></tr>\"\n\n    res += (\n        f\"<tr><td><b>{gettext('Temperature')}</b></td>\"\n        f\"<td><b>{f_to_c(condition['temperature'])}\u00b0C / {condition['temperature']}\u00b0F</b></td></tr>\"\n    )\n\n    res += (\n        f\"<tr><td>{gettext('Feels like')}</td><td>{f_to_c(condition['apparentTemperature'])}\u00b0C / \"\n        f\"{condition['apparentTemperature']}\u00b0F</td></tr>\"\n    )\n\n    res += (\n        f\"<tr><td>{gettext('Wind')}</td><td>{condition['windBearing']}\u00b0 \u2014 \"\n        f\"{'%.2f' % (condition['windSpeed'] * 1.6093440006147)} km/h / {condition['windSpeed']} mph</td></tr>\"\n    )\n\n    res += f\"<tr><td>{gettext('Visibility')}</td><td>{condition['visibility']} km</td>\"\n\n    res += f\"<tr><td>{gettext('Humidity')}</td><td>{condition['humidity'] * 100}%</td></tr>\"\n\n    return res\n\n\ndef generate_day_table(day):\n    res = \"\"\n\n    res += (\n        f\"<tr><td>{gettext('Min temp.')}</td><td>{f_to_c(day['temperatureLow'])}\u00b0C / \"\n        f\"{day['temperatureLow']}\u00b0F</td></tr>\"\n    )\n    res += (\n        f\"<tr><td>{gettext('Max temp.')}</td><td>{f_to_c(day['temperatureHigh'])}\u00b0C / \"\n        f\"{day['temperatureHigh']}\u00b0F</td></tr>\"\n    )\n    res += f\"<tr><td>{gettext('UV index')}</td><td>{day['uvIndex']}</td></tr>\"\n    res += (\n        f\"<tr><td>{gettext('Sunrise')}</td><td>{datetime.fromtimestamp(day['sunriseTime']).strftime('%H:%M')}</td></tr>\"\n    )\n    res += (\n        f\"<tr><td>{gettext('Sunset')}</td><td>{datetime.fromtimestamp(day['sunsetTime']).strftime('%H:%M')}</td></tr>\"\n    )\n\n    return res\n\n\ndef request(query, params):\n    params[\"url\"] = url.format(query=quote(query), lang=params['language'].split('-')[0])\n\n    return params\n\n\ndef f_to_c(temperature):\n    return \"%.2f\" % ((temperature - 32) / 1.8)\n\n\ndef response(resp):\n    results = []\n\n    if resp.text.strip() == \"ddg_spice_forecast();\":\n        return []\n\n    result = loads(resp.text[resp.text.find('\\n') + 1 : resp.text.rfind('\\n') - 2])\n\n    current = result[\"currently\"]\n\n    title = result['flags']['ddg-location']\n\n    infobox = f\"<h3>{gettext('Current condition')}</h3><table><tbody>\"\n\n    infobox += generate_condition_table(current)\n\n    infobox += \"</tbody></table>\"\n\n    last_date = None\n\n    for time in result['hourly']['data']:\n        current_time = datetime.fromtimestamp(time['time'])\n\n        if last_date != current_time.date():\n            if last_date is not None:\n                infobox += \"</tbody></table>\"\n\n            infobox += f\"<h3>{current_time.strftime('%Y-%m-%d')}</h3>\"\n\n            infobox += \"<table><tbody>\"\n\n            for day in result['daily']['data']:\n                if datetime.fromtimestamp(day['time']).date() == current_time.date():\n                    infobox += generate_day_table(day)\n\n            infobox += \"</tbody></table><table><tbody>\"\n\n        last_date = current_time.date()\n\n        infobox += f\"<tr><td rowspan=\\\"7\\\"><b>{current_time.strftime('%H:%M')}</b></td></tr>\"\n\n        infobox += generate_condition_table(time)\n\n    infobox += \"</tbody></table>\"\n\n    results.append(\n        {\n            \"infobox\": title,\n            \"content\": infobox,\n        }\n    )\n\n    return results\n", "path": "searx/engines/duckduckgo_weather.py"}], "after_files": [{"content": "# SPDX-License-Identifier: AGPL-3.0-or-later\n# lint: pylint\n\"\"\"DuckDuckGo Weather\"\"\"\n\nfrom json import loads\nfrom urllib.parse import quote\n\nfrom datetime import datetime\nfrom flask_babel import gettext\n\nabout = {\n    \"website\": 'https://duckduckgo.com/',\n    \"wikidata_id\": 'Q12805',\n    \"official_api_documentation\": None,\n    \"use_official_api\": True,\n    \"require_api_key\": False,\n    \"results\": \"JSON\",\n}\n\ncategories = [\"others\"]\n\nurl = \"https://duckduckgo.com/js/spice/forecast/{query}/{lang}\"\n\n\ndef generate_condition_table(condition):\n    res = \"\"\n\n    res += f\"<tr><td><b>{gettext('Condition')}</b></td>\" f\"<td><b>{condition['summary']}</b></td></tr>\"\n\n    res += (\n        f\"<tr><td><b>{gettext('Temperature')}</b></td>\"\n        f\"<td><b>{f_to_c(condition['temperature'])}\u00b0C / {condition['temperature']}\u00b0F</b></td></tr>\"\n    )\n\n    res += (\n        f\"<tr><td>{gettext('Feels like')}</td><td>{f_to_c(condition['apparentTemperature'])}\u00b0C / \"\n        f\"{condition['apparentTemperature']}\u00b0F</td></tr>\"\n    )\n\n    res += (\n        f\"<tr><td>{gettext('Wind')}</td><td>{condition['windBearing']}\u00b0 \u2014 \"\n        f\"{(condition['windSpeed'] * 1.6093440006147):.2f} km/h / {condition['windSpeed']} mph</td></tr>\"\n    )\n\n    res += f\"<tr><td>{gettext('Visibility')}</td><td>{condition['visibility']} km</td>\"\n\n    res += f\"<tr><td>{gettext('Humidity')}</td><td>{(condition['humidity'] * 100):.1f}%</td></tr>\"\n\n    return res\n\n\ndef generate_day_table(day):\n    res = \"\"\n\n    res += (\n        f\"<tr><td>{gettext('Min temp.')}</td><td>{f_to_c(day['temperatureLow'])}\u00b0C / \"\n        f\"{day['temperatureLow']}\u00b0F</td></tr>\"\n    )\n    res += (\n        f\"<tr><td>{gettext('Max temp.')}</td><td>{f_to_c(day['temperatureHigh'])}\u00b0C / \"\n        f\"{day['temperatureHigh']}\u00b0F</td></tr>\"\n    )\n    res += f\"<tr><td>{gettext('UV index')}</td><td>{day['uvIndex']}</td></tr>\"\n    res += (\n        f\"<tr><td>{gettext('Sunrise')}</td><td>{datetime.fromtimestamp(day['sunriseTime']).strftime('%H:%M')}</td></tr>\"\n    )\n    res += (\n        f\"<tr><td>{gettext('Sunset')}</td><td>{datetime.fromtimestamp(day['sunsetTime']).strftime('%H:%M')}</td></tr>\"\n    )\n\n    return res\n\n\ndef request(query, params):\n    params[\"url\"] = url.format(query=quote(query), lang=params['language'].split('-')[0])\n\n    return params\n\n\ndef f_to_c(temperature):\n    return \"%.2f\" % ((temperature - 32) / 1.8)\n\n\ndef response(resp):\n    results = []\n\n    if resp.text.strip() == \"ddg_spice_forecast();\":\n        return []\n\n    result = loads(resp.text[resp.text.find('\\n') + 1 : resp.text.rfind('\\n') - 2])\n\n    current = result[\"currently\"]\n\n    title = result['flags']['ddg-location']\n\n    infobox = f\"<h3>{gettext('Current condition')}</h3><table><tbody>\"\n\n    infobox += generate_condition_table(current)\n\n    infobox += \"</tbody></table>\"\n\n    last_date = None\n\n    for time in result['hourly']['data']:\n        current_time = datetime.fromtimestamp(time['time'])\n\n        if last_date != current_time.date():\n            if last_date is not None:\n                infobox += \"</tbody></table>\"\n\n            infobox += f\"<h3>{current_time.strftime('%Y-%m-%d')}</h3>\"\n\n            infobox += \"<table><tbody>\"\n\n            for day in result['daily']['data']:\n                if datetime.fromtimestamp(day['time']).date() == current_time.date():\n                    infobox += generate_day_table(day)\n\n            infobox += \"</tbody></table><table><tbody>\"\n\n        last_date = current_time.date()\n\n        infobox += f\"<tr><td rowspan=\\\"7\\\"><b>{current_time.strftime('%H:%M')}</b></td></tr>\"\n\n        infobox += generate_condition_table(time)\n\n    infobox += \"</tbody></table>\"\n\n    results.append(\n        {\n            \"infobox\": title,\n            \"content\": infobox,\n        }\n    )\n\n    return results\n", "path": "searx/engines/duckduckgo_weather.py"}]}