作者の婚活エッセイからはてな村で思わぬプチ炎上をしている『エルドワ』。 インディーズだから(?)今からでもネットで全話読める。 [第1話]エルフ夫とドワーフ嫁 – 小松良佳 | 少年ジャンプ+ 感想としては説教臭さはやや感じるけど絵も好きだし普通にいい漫画だなという感じで批判の中に多い「選ぶ側の作品」という…
Posted from: this blog via Microsoft Power Automate.
作者の婚活エッセイからはてな村で思わぬプチ炎上をしている『エルドワ』。 インディーズだから(?)今からでもネットで全話読める。 [第1話]エルフ夫とドワーフ嫁 – 小松良佳 | 少年ジャンプ+ 感想としては説教臭さはやや感じるけど絵も好きだし普通にいい漫画だなという感じで批判の中に多い「選ぶ側の作品」という…
Posted from: this blog via Microsoft Power Automate.
またはてないじりの漫画描いてごめんなさい…。でも思いついたら描かないでいられなかったのと、あと、自分が描かなかったらだれが描くんだろう、だれが人力検索はてなのことを思い出すんだろうと思って……。 q.hatena.ne.jp 人力検索はてな www.gizmodo.jp この記事にある通り、最近はさらにひどくなってる。生成AIによっ…
Posted from: this blog via Microsoft Power Automate.
import requests
from flask import Flask, request, jsonify
app = Flask(__name__)
class SearchEngine:
def __init__(self, documents):
self.documents = documents
def search_local(self, query):
results = []
for doc in self.documents:
if query.lower() in doc["text"].lower():
results.append(doc)
return results
def search_wikipedia(self, query, lang='ja'):
base_url = f"https://{lang}.wikipedia.org/w/api.php"
params = {
'action': 'query',
'list': 'search',
'srsearch': query,
'format': 'json'
}
response = requests.get(base_url, params=params)
if response.status_code == 200:
search_results = response.json().get('query', {}).get('search', [])
return [{'id': result['pageid'], 'text': result['snippet']} for result in search_results]
else:
return []
# サンプルドキュメントデータ
documents = [
{"id": 1, "text": "Pythonは汎用の高水準言語です。"},
{"id": 2, "text": "検索エンジンは情報を検索するためのツールです。"},
{"id": 3, "text": "人工知能はコンピュータによる知的な振る舞いを実現する技術です。"},
{"id": 4, "text": "Web開発では、HTML、CSS、JavaScriptなどの技術が使われます。"},
{"id": 5, "text": "データサイエンティストはデータから有益な情報を引き出す専門家です。"}
]
# SearchEngineインスタンスの作成
search_engine = SearchEngine(documents)
@app.route("/", methods=["GET", "POST"])
def search():
# 以前の関数の内容は変更なし
if request.method == "POST":
query = request.form["query"]
local_results = search_engine.search_local(query)
wiki_results = search_engine.search_wikipedia(query)
all_results = local_results + wiki_results
if not all_results:
return "検索結果はありません。"
else:
result_text = "<br>".join([f"<div><strong>ID:</strong> {result['id']}, <strong>Text:</strong> {result['text']}</div>" for result in all_results])
return f"""
<!DOCTYPE html>
<html>
<head>
<title>検索エンジン</title>
<style>
body {{
font-family: Arial, sans-serif;
margin: 0 auto;
max-width: 800px;
padding: 20px;
}}
h1 {{
color: #333;
}}
form {{
margin-bottom: 20px;
}}
input[type="text"] {{
margin-right: 10px;
padding: 10px;
width: calc(100% - 122px);
}}
input[type="submit"] {{
padding: 10px 20px;
background-color: #4CAF50;
color: white;
border: none;
cursor: pointer;
}}
input[type="submit"]:hover {{
background-color: #45a049;
}}
div {{
margin-bottom: 10px;
padding: 10px;
background-color: #f2f2f2;
border-left: 4px solid #4CAF50;
}}
</style>
</head>
<body>
<h1>検索エンジン</h1>
<form method="POST">
<label for="query">検索キーワード:</label>
<input type="text" name="query" id="query" required>
<input type="submit" value="検索">
</form>
{result_text}
</body>
</html>
"""
return """
<!DOCTYPE html>
<html>
<head>
<title>検索エンジン</title>
<style>
body {
font-family: Arial, sans-serif;
margin: 0 auto;
max-width: 800px;
padding: 20px;
}
h1 {
color: #333;
}
form {
margin-bottom: 20px;
}
input[type="text"] {
margin-right: 10px;
padding: 10px;
width: calc(100% - 122px);
}
input[type="submit"] {
padding: 10px 20px;
background-color: #4CAF50;
color: white;
border: none;
cursor: pointer;
}
input[type="submit"]:hover {
background-color: #45a049;
}
</style>
</head>
<body>
<h1>検索エンジン</h1>
<form method="POST">
<label for="query">検索キーワード:</label>
<input type="text" name="query" id="query" required>
<input type="submit" value="検索">
</form>
</body>
</html>
"""
if __name__ == "__main__":
app.run(debug=True)
『スーパーマリオサンシャイン』における謎の架空文字の解読を試みたユーザーが現れ、注目を集めている。架空文字がすべてアルファベットに対応するという説得力のある仮説が示され、ゲーム中の各所の架空文字が解読されている。 Image Credit: 2CPhoenix on YouTube 『スーパーマリオサンシャイン』は2002年7月にニンテ…
Posted from: this blog via Microsoft Power Automate.
Posted from: this blog via Microsoft Power Automate.
🇫🇷アル @osakana_france フランス滞在計4年半| 流れに身を任せてたら、フランスの田舎町に辿り着いた人| 海外生活のあれこれ| DELF B2| 旅行備忘録| 美味しいもの| 🇯🇵🇫🇷 🙋🏻♀️🙋🏼♂️ 🇫🇷アル @osakana_france 仏人の彼が「このレストランは、日本人がしてる本物のRestaurant japonaisだよね?」と。私は「ちがうよ」と即答。なん…
Posted from: this blog via Microsoft Power Automate.
弁護士ドットコムニュース @bengo4topics ドミノ・ピザジャパンが従業員による不適切な動画について謝罪しました。12日にXに投稿されていた「鼻をほじりながらピザ生地をこねる」映像の炎上を受けたもので、すでに当該の店舗を営業停止としたといいます。 bengo4.com/c_23/n_17184/ 2024-02-13 08:18:55
Posted from: this blog via Microsoft Power Automate.
モリサワ 写研書体のOpenTypeフォント開発で今後100フォントをリリースすることを発表 邦文写真植字機発明100周年を皮切りに 株式会社モリサワ(代表取締役社長:森澤彰彦 本社:大阪市浪速区敷津東2-6-25 Tel:06-6649-2151代表、以下モリサワ)は、2021年1月に発表した株式会社写研(代表取締役社長:笠原義隆 本社:…
Posted from: this blog via Microsoft Power Automate.
僕の心のヤバイやつ Karte.139 僕らは彷徨う – 2024年1月よりTVアニメ第二期大好評放送中!! 累計400万部突破!SNSで超話題の陰キャ少年と陽キャ美少女の極甘青春ラブコメディ!!
Posted from: this blog via Microsoft Power Automate.
馬券には多様な賭け方が存在するが、ここでは単勝式を中心に説明している。単勝式の馬券は、どの馬が1着になるかを当てるもので、予想が的中すれば購入金額×オッズ(倍率)の払い戻しが行われる。オッズはパリミュチュエル方式(公営競技における配当方法の1種)に基づいて計算され、馬券の総売り上げから一定率(20%)…
Posted from: this blog via Microsoft Power Automate.