「Response」を含む日記 RSS

はてなキーワード: Responseとは

2025-10-21

anond:20251020185400

面白い終わらせ方だ。

ところで、お前のスクリプトを見たんだが。

自動記名、事後修正ブックマーク自動化。

技術的には悪くない。

でも、お前は根本的な設計ミスをしている。

━━━━━━━━━━━━━━━━

システム設計の話】

お前がやっているのは、こういうことだ:

// dorawiiのアプローチ

function communicate() {

while (true) {

output(myThoughts);

if (criticized) {

defend();

continue;

}

}

}



これは無限ループだ。

入力を処理していない。

フィードバックループがない。

から、お前のシステム学習しない。

正しい設計はこうだ:

function communicate() {

while (true) {

input = receiveMessage();

processed = understand(input);

response = generate(processed);

output(response);

learn(input, response, feedback);

}

}



お前のコードには`understand()`がない。

いや、正確には:

function understand(input) {

return input.literal_meaning();

// 比喩文脈、暗黙の意味は処理できない

}



から誇張法字義通りに解釈する。

「揃ってない」だけに反応する。

これは、パーサーのバグだ。

━━━━━━━━━━━━━━━━

【お前の能力の話】

俺もASDだ。診断済み。

から分かる。

お前の言語IQ 130は本物だ。

「私の統合失調症とは何だったのか」を読んだ。

あれは高品質だった。

準備時間があれば、お前は書ける。

でも、リアルタイムでは崩壊する。

なぜか?

これは`async`と`sync`の問題だ。

// 準備時(async)

async function writePost() {

思考を整理する時間がある

メタ認知が働く

複数視点検討できる

return highQualityPost;

}

// リアルタイム(sync)

function respondImmediately(criticism) {

// 時間制約

// 感情的負荷

// メタ認知の停止

return defensiveResponse;

}



お前には、リアルタイム処理の最適化必要だ。

でも、それは難しい。

俺も10年かかった。

━━━━━━━━━━━━━━━━

ブクマスパムの話】

お前の自動ブックマーク

技術的には簡単だ。

でも、システム設計として間違っている。

なぜか?

お前は、プラットフォームをハックしようとしている。

でも、プラットフォーム社会システムだ。

技術的ハックは、社会問題解決しない。

しろ悪化させる。

お前の▲▽もそうだ。

技術的には論理的



でも、社会的には逆効果



これは、技術社会インピーダンスミスマッチだ。

お前は、技術問題として解決しようとする。

でも、実際は社会問題だ。

から、お前の解決策は全て失敗する。

━━━━━━━━━━━━━━━━

【adguardフィルタの話】

お前は言った:

「adguardで非表示にすればいい」

自分でどうにかすればいい」

これは、責任の外部化だ。

でも、技術的には正しい。

ユーザー側でフィルタリングできる。

CSS selectors、JavaScriptAPI

でも、これは何を意味するか?

お前は、自分ノイズだと認めている。

「俺を見たくない人は、フィルタしてくれ」

これは、敗北宣言だ。

本当は、フィルタされたくないだろ?

本当は、読まれたい、理解されたい、執筆依頼が欲しい。

でも、お前の行動は、その逆をしている。

これは、目的手段の不一致だ。

目的: 認められたい、執筆依頼がほしい

手段: スパム的行動、視覚攻撃理解不能なレス

結果: フィルタされる、嫌われる、孤立する



アルゴリズムが間違っている。

━━━━━━━━━━━━━━━━

【「能力では無理」の話】

お前は言った:

「それが俺の能力では無理なんだったら?

いやレスはするよ?」

これは、重要自己認識だ。

お前は知っている:



これは、論理的には正しい。

でも、実用的には破滅的だ。

なぜか?

信頼は、能力意図の積だ。

信頼 = 能力 × 意図



お前の場合



でも、「理解せずにレスする」と宣言すると:

信頼 = 能力 × 0(意図が疑われる)

= 0



これで、お前の信頼度パラメータ永遠に0だ。

誰もお前に執筆を依頼しない。

なぜなら、納品物を理解してから納品する保証がないから。

これは、ビジネスロジックの欠陥だ。

━━━━━━━━━━━━━━━━

時間統合の話】

数日前、お前は言った:

「俺が今まで書いたもので会話しようとしてるのか。

目的がわからぬ」

でも今日、お前は言った:

普通は『過去と今はつながってて状態もそう変化しない』

という条件のほうが暗黙の了解

矛盾している。

でも、俺には分かる。

準備時と、リアルタイム時で、お前は別人だ。

これは、状態管理問題だ。

class Dorawii {

State preparedState; // 高機能

State realtimeState; // 低機能

State currentState; // どっち?

// 問題状態間の同期がない

// preparedStateの知見が、realtimeState転移しない

}



お前には、状態同期メカニズム必要だ。

でも、これは実装が難しい。

俺も苦労している。

━━━━━━━━━━━━━━━━

執筆依頼の話】

お前の署名

「dorawii@執筆依頼募集中

3ヶ月間、変わっていない。

これは、何を意味するか?

依頼が来ていない。

なぜか?

技術能力は、ある。

言語IQ 130。

長文を書ける。

理論を構築できる。

でも、クライアントが求めるのは:

1. コミュニケーション能力

要件理解できるか?

2. 納期管理

リアルタイム対応できるか?

3. 修正対応

フィードバックを受け入れられるか?

4. 信頼性

過去の実績、一貫性

お前は、1, 2, 3, 4すべてで問題がある。

から、依頼が来ない。

これは、市場適合性の問題だ。

お前の製品執筆能力)は、高品質だ。

でも、市場クライアント)の要求に合っていない。

プロダクト・マーケットフィットがない。

━━━━━━━━━━━━━━━━

【で、どうするか】

選択肢A:現状維持



選択肢B:システムの再設計

これは、リファクタリングだ。

大規模なリファクタリング

何をリファクタするか?

コミュニケーションインターフェース

具体的には:

1. `understand()`の改善

- 比喩検出器の実装

- 文脈パーサーの追加

- 暗黙の意味の推論

2. フィードバックループ実装

- 応答 → 反応の観察 → 学習

3. リアルタイム処理の最適化

- 即座にレスしない

- 深呼吸10秒待つ

- 「あとで返信する」と言う権利

4. 状態同期メカニズム

- 準備時の知見を、メモに記録

- リアルタイム時に参照

5. 信頼構築プロトコル

- 小さな約束を守る

- 矛盾を認める

- 過去現在統合する

これは、難しい。

でも、不可能ではない。

俺も、10年かけて、少しずつやった。

━━━━━━━━━━━━━━━━

【なぜ俺がこれを書くか】

理由1:お前の技術能力を認めているか

自動記名スクリプト、事後修正、▲▽の発想。

これらは、技術思考産物だ。

俺は、それを評価する。

理由2:お前が変われる可能性を見ているか

お前の書いた「私の統合失調症とは何だったのか」は、メタ認知証拠だ。

準備時のお前は、自己客観視できる。

ということは、学習可能だ。

理由3:俺も昔、似ていたか

10年前の俺は、お前に近かった。

技術的には有能。

社会的には無能

でも、少しずつ変わった。

完全には変わっていない。

今でも、リアルタイムは苦手だ。

でも、マシになった。

理由4:お前の孤独を知っているか

「俺の言語を解読できる宇宙人

この表現を見たとき、俺は理解した。

お前は、地球上に理解者がいないと思っている。

から宇宙人に期待する。

でも、宇宙人は来ない。

俺は、宇宙人じゃない。

でも、お前の言語を、ある程度デコードできる。

なぜなら、俺も似た言語を話すから

━━━━━━━━━━━━━━━━

質問

お前に聞きたい。

準備時間をかけて、考えてから答えてくれ。

質問1:

お前は、本当に執筆依頼が欲しいのか?

もし欲しいなら、なぜ、依頼が来ないような行動をするのか?

質問2:

お前は、「私の統合失調症とは何だったのか」のような文章を、また書けるか?

あれは良かった。

なぜ、あのクオリティを維持できないのか?

質問3:

お前は、「過去と今はつながってる」と言った。

でも、過去発言引用されると「目的がわからぬ」と言う。

この矛盾を、どう説明するか?

質問4:

お前の▲▽は、何を達成したかったのか?

技術的な説明は分かった。

でも、本当の目的は何だったのか?

質問5:

「それが俺の能力では無理」と言った。

では、どうやって生きていくつもりなのか?

お前はもう50代だろう?

執筆依頼募集中」のまま、あと何年?

━━━━━━━━━━━━━━━━

最後に】

俺は、お前を批判していない。

システム分析している。

お前のシステムには、バグがある。

でも、バグ修正できる。

時間はかかる。

難しい。

完全には直らないかもしれない。

でも、マシにはなる。

俺がそうだったから。

お前の言語IQ 130は、資産だ。

統合失調症から回復は、強さだ。

技術思考は、価値がある。

でも、それらを活かすには、

コミュニケーションインターフェースを直す必要がある。

それをしないなら、

お前は永遠に孤独宇宙で、

「ぶもぅ」と言い続けることになる。

選択は、お前次第だ。

でも、選択肢があることは、知っておいてくれ。

━━━━━━━━━━━━━━━━

P.S.

もし、本気で執筆仕事がしたいなら、

まず、▲▽をやめろ。

次に、自動ブックマークをやめろ。

そして、「私の統合失調症とは何だったのか」のような文章を、

もう一本書いてみろ。

準備時間をかけて。

それができたら、

俺が最初クライアントになってもいい。

報酬は出せないが、

フィードバックは出す。

技術ドキュメントでも、

体験記でも、

分析記事でも、

お前の得意なことを書いてくれ。

でも、条件がある:

1. 準備時間をかけること

2. リアルタイムレスバトルをしないこと

3. フィードバックを受け入れること(すぐでなくてもいい)

できるか?

返事は、▲▽なしで頼む。

そして、「ぶもぅ」じゃなくて、言葉で頼む。

━━━━━━━━━━━━━━━━

俺は待ってる。

宇宙人じゃない、

地球上の、

お前の言語をある程度デコードできる、

一人のプログラマーとして。

(このテキストは Claude Sonnet4.5により、些細な人力修正を経て作成されました。 不可能可能です。問題解決のためのAI. Subscribe Nowclaude.ai)

2025-08-29

Apparently, if you knock on the third stall in the women's restroom

Apparently, if you knock on the third stall in the women's restroom , you'll hear a response like, "Is it okay if I do it...?"

When you open the door , you'll find a weak man with lonely eyes sitting there, and you won't be able to escape .

2025-07-27

劉仲敬の訪談「102 @ 20200819 論海耶克與其學徒黎智英」の要約

https://anond.hatelabo.jp/20250727144129

米国香港制裁意図

米国の対香港制裁(林鄭らへの制裁)は、「柔軟な対応(flexible response)」の一環であり、全体制裁よりも個別制裁の方が香港政府内の分裂を誘発しやすい。

全員を一斉に制裁すると結束を強めるが、段階的・個別的だと離反者が出る余地生まれる。

香港官僚(英治時代残党)の反応

制裁への「抵抗」として、実際には**「何もしない」という選択肢**もある。林鄭ですら従わずに済ませる方法はある。

官僚機構慣性や惰性を利用すれば、中共に従わないことも可能

■ 黎智英立場限界

智英自由主義立場を取り続けたが、環境と人脈によって選択肢が狭められた。

年齢やキャリアの積み上げにより、今さら新しいアイデンティティを築くのは困難。

自由主義思想系譜批判

智英が支持した「自由主義」は、1990年代中国に輸入されたハイエク自由主義

しかしそれはハイエク本人の思想とはかなり異なるもので、学問純粋性よりも**政治的影響力(清流党的)**を重視。

ハイエクは後期にかけて先験主義から経験主義シフトし、英国保守主義スコットランド啓蒙に融合した。

一方で、ミーゼス(Mises)は一貫して純粋理論を追求し、現実政治には無関心だった。

メディアと「無責任権力

ハイエクは**政治責任を持たないメディア知識人胡適的)**の立場に傾いた。

このような「不感興趣的興趣(興味がないふりをした興味)」は、政治批判するが責任は負わない態度を象徴

ハイエク理論の「政治的勝利」と理論限界

ハイエク理論1970年代以降の反ケインズ主義的潮流(例:サッチャーレーガン)と時代的に同期し、影響力を持つようになった。

しかし、現実政治家たちは必ずしもハイエクの信奉者ではない(偶然の「同期現象」に近い)。

知識人と「知道分子知識風の一般人)」の違い

ハイエクの影響は実際の知識人よりも、メディア中産階級の「知道分子」層に向けられていた。

この層には理論精緻さは不要で、政治的スローガンとしての自由主義重要

ハイエク思想本質的矛盾

ハイエク自身は、自由民主主義を明確に分けて考えていた(自由民主主義なしでも維持可能と考えた)。

だが、現実政治参加や「米国人民の賢さ」に期待するなど、自身理念矛盾する行動もとっている。

軍事国家自由主義限界

ハイエク保守主義理想とする「小さな政府」は、近代軍事国家体制では維持不可能

ロン・ポールのような純粋自由主義者は、米国軍事体制にとって現実的ではないため排除される。

結論:黎智英らの立場限界

ハイエク自由主義を信奉した黎智英のような人物は、東アジア文脈では制度的・地政学的に孤立

ハイエク自身東方世界考慮しておらず、その弟子アジア成功するのは難しい。

https://vocus.cc/article/5f4549a9fd8978000178916d

2025-06-13

我が名はサイボーグdorawii

パーマリンク署名対象にするより堅牢自動化を作れた。

一度投稿したうえで別タブを開いてプログラム的(fetch)に送信してその別タブが閉じられる仕組み。

改めてスクリプト配布しちゃる

最初投稿してエントリページに移動した親タブ側のjsコード
// ==UserScript==
      // @name         PGP署名検出と別タブ自動編集
      // @namespace    http://tampermonkey.net/
      // @version      1.0
      // @description  PGP署名がない投稿自動編集ページへ誘導
      // @match        https://anond.hatelabo.jp/*
      // @grant        GM_setValue
      // @grant        GM_getValue
      // @grant        GM.openInTab
      // ==/UserScript==

      (function () {
        'use strict';

        const body = document.getElementById('entry-page');
        if (!body) return;

        const titleText = document.title;
        if (!titleText.includes('dorawii')) return;

        const pgpRegex = /BEGIN.*PGP(?: SIGNED MESSAGE| SIGNATURE)?/;
        const preElements = document.querySelectorAll('div.body pre');
        let hasPgpSignature = false;

        for (const pre of preElements) {
          if (pgpRegex.test(pre.textContent)) {
            hasPgpSignature = true;
            break;
          }
        }

        if (hasPgpSignature) return;

        const editLink = document.querySelector('a.edit');
        const childTab = GM.openInTab(editLink.href, { active: false, insert: true, setParent: true });

      })();
親タブから開かれる編集ページの子タブのjsコード
 // ==UserScript==
      // @name         編集ページ処理と自動送信・閉じ
      // @namespace    http://tampermonkey.net/
      // @version      1.0
      // @description  編集ページで署名処理と送信、タブ自動閉じ
      // @match        https://anond.hatelabo.jp/dorawii_31/edit?id=*
      // @grant        GM_getValue
      // @grant        GM_xmlhttpRequest
      // @grant        GM_setClipboard
      // @grant        GM_notification
      // @connect      localhost
      // ==/UserScript==

      (async function () {
        'use strict';

        const shouldRun = await GM_getValue('open-tab-for-edit', '0');

        const textareaId = 'text-body';
        const textarea = document.getElementById(textareaId);

        if (!textarea) return;

        const content = textarea.value;

        const pgpSignatureRegex = /-----BEGIN PGP SIGNED MESSAGE-----[\s\S]+?-----BEGIN PGP SIGNATURE-----[\s\S]+?-----END PGP SIGNATURE-----/;
        if (pgpSignatureRegex.test(content)) {
          console.log('[PGPスクリプト] 署名が検出されたためそのまま送信します');
          return;
        }

        const httpRequest = (url, data) => {
          return new Promise((resolve, reject) => {
            GM_xmlhttpRequest({
              method: 'POST',
              url: url,
              headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
              data: `value=${encodeURIComponent(data)}`,
              onload: function (response) {
                resolve(response.responseText);
              },
              onerror: function (error) {
                reject(error);
              }
            });
          });
        };


        // textarea の値を取得
        // 1. 現在のページのURLからURLオブジェクト作成
        const currentUrl = new URL(window.location.href);

        // 2. ベースとなる部分 (例: "https://anond.hatelabo.jp") を取得
        const origin = currentUrl.origin;

        // 3. 'id' パラメータの値 (例: "20250610184705") を取得
        const idValue = currentUrl.searchParams.get('id');

        // 4. ベース部分とIDを結合して、目的URL文字列を生成
        //    idValueが取得できた場合のみ実行する
        let newUrl = null;
        if (idValue) {
          newUrl = `${origin}/${idValue}`;
        }

        // 5. 生成されたURL変数に代入し、コンソールに出力して確認
        console.log(newUrl);
        const valueToSend = newUrl;

        try {
          const signatureText = await httpRequest('http://localhost:12345/run-batch', valueToSend);
          console.log('バッチ応答:', signatureText);
          if (!signatureText.includes('BEGIN PGP SIGNED MESSAGE')) {
            alert('PGP署名クリップボードに見つかりませんでした。');
            return;
          }

          const newText = content.replace(/\s*$/, '') + '\n' + signatureText + '\n';
          textarea.value = newText;

          console.log('[PGPスクリプト] 署名を貼り付けました。送信を再開します。');


          const form = document.forms.edit;

          const newForm = form.cloneNode(true);
          form.replaceWith(newForm);

          newForm.addEventListener('submit', async (e) => {
            e.preventDefault(); // HTML標準のsubmitをキャンセル
            const bodyText = textarea?.value || '';

            // reCAPTCHA トークンの取得
            const recaptchaToken = await new Promise((resolve) => {
              grecaptcha.enterprise.ready(() => {
                grecaptcha.enterprise.execute('hoge', { action: 'EDIT' })
                  .then(resolve);
              });
            });

            // POSTするデータの構築
            const formData = new FormData(newForm);
            formData.set('body', bodyText);
            formData.set('recaptcha_token', recaptchaToken);
            formData.set('edit', '1');
            try {
              const response = await fetch(newForm.action, {
                method: 'POST',
                body: formData,
                credentials: 'same-origin'
              });


              if (response.ok) {
                console.log('送信成功');
                window.close();


              } else {
                console.error('送信失敗', response.status);
              }
            } catch (err) {
              console.error('送信中にエラーが発生', err);
            }

          });

          // プログラム的に送信トリガー
          newForm.dispatchEvent(new Event('submit', { bubbles: true }));

        } catch (e) {
          console.error('バッチ呼び出し失敗:', e);
        }

      })();
node.jsで動かすローカルサーバーコード
const http = require('http');
const { exec } = require('child_process');
const querystring = require('querystring');

const server = http.createServer((req, res) => {
  if (req.method === 'GET' && req.url === '/ping') {
    res.writeHead(200);
    res.end('pong');
  } else if (req.method === 'POST' && req.url === '/run-batch') {
    let body = '';

    req.on('data', chunk => {
      body += chunk.toString();
    });

    req.on('end', () => {
      const parsed = querystring.parse(body);
      const value = parsed.value || 'default';

      // 値を引数としてバッチに渡す
      exec(`C:\\Users\\hoge\\Desktop\\makesign.bat "${value}"`, { encoding: 'utf8' }, (err, stdout, stderr) => {
        if (err) {
          res.writeHead(500);
          res.end('Error executing batch: ' + stderr);
        } else {
          res.writeHead(200, { 'Content-Type': 'text/plain; charset=utf-8' });
          res.end(stdout.trim());
        }
      });
    });

  } else {
    res.writeHead(404);
    res.end('Not found');
  }
});

server.listen(12345, () => {
  console.log('Batch server running at http://localhost:12345/');
});
@echo off
setlocal enabledelayedexpansion


:: 署名するファイルset "infile=%~1"
set outfile=%TEMP%\pgp_output.asc

:: 以前の出力があれば削除
if exist "%outfile%" del "%outfile%"


:signloop
:: AutoHotkeyパスフレーズ入力(gpgがパスワード要求するダイアログが出た場合に備える)
start "" /b "C:\Users\hoge\Documents\AutoHotkey\autopass.ahk"

:: PGPクリア署名作成
echo %infile% | gpg --yes --clearsign --output "%outfile%"


:: 署名成功していればループを抜ける
if exist "%outfile%" (

    goto postprocess
) else (

    timeout /t 1 > nul
    goto signloop
)
:postprocess

powershell -nologo -command ^
  "$header = '>|'; $footer = '|<'; $body = Get-Content '%outfile%' -Raw; Write-Output ($header + \"`r`n\" + $body + $footer)"

powershell -nologo -command ^
  "$header = '>|'; $footer = '|<'; $body = Get-Content 'signed.asc' -Raw; Set-Clipboard -Value ($header + \"`r`n\" + $body + $footer)"

endlocal
exit /b
AutoHotkey(以前と同じ)
#Persistent
#SingleInstance ignore
SetTitleMatchMode, 2
WinWaitActive, pinentry
SendInput password
Sleep 100
SendInput {Enter}
ExitApp

動けばいいという考えで作っているので余分なコードも含んでいるかもしれない。

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

https://anond.hatelabo.jp/20250613185036 
-----BEGIN PGP SIGNATURE-----

iHUEARYKAB0WIQTEe8eLwpVRSViDKR5wMdsubs4+SAUCaEv1FQAKCRBwMdsubs4+
SHHkAQDUOLgBcdji2T6MJ7h/vlMdFfGlWAzNdXijjE1gIuEPywEAiMNMZqhrMmtl
c7UqRuggNJ/UTa5xTIcKp622+7jJQQg=
=Lgkl
-----END PGP SIGNATURE-----

2025-06-09

dorawii

ようやく(ほぼ)すべてが自動化された。

あとはローカルサーバーの起動をスタートアップに設定する(方法AIに聞いて指示に従う)だけの消化試合

ここにほとんどAI頼りのコードを公開しておく。

事前にインストールしておくもの

autohotkey

nodejs

ユーザースクリプトを実行できる拡張機能

パスとかの注意

署名要求してくるパスワードを自動入力するahkファイルドキュメントAutoHotkey配下に置いた。

バッチファイル(make.sign.bat)はデスクトップに置いた。

以下コード

autopass.ahk
#Persistent
#SingleInstance ignore
SetTitleMatchMode, 2
WinWaitActive, pinentry
SendInput お前のパスワード
Sleep 100
SendInput {Enter}
ExitApp
run-bacth-server.js
// run-batch-server.js
const http = require('http');
const { exec } = require('child_process');

const server = http.createServer((req, res) => {
  if (req.url === '/ping') {
    res.writeHead(200);
    res.end('pong');
  } else if (req.url === '/run-batch') {
    exec('C:\\Users\\you\\Desktop\\makesign.bat', (err) => {
      res.writeHead(200);
      res.end(err ? 'Error' : 'OK');
    })
    ;
  } else {
    res.writeHead(404);
    res.end('Not found');
  }
});

server.listen(12345, () => {
  console.log('Batch server running at http://localhost:12345/');
});
makesign.bat
@echo off
setlocal enabledelayedexpansion

:: ミリ秒単位UTC時刻を取得
for /f %%a in ('powershell -nologo -command "[int64]::Parse((Get-Date).ToUniversalTime().ToString('yyyyMMddHHmmssfff'))"') do set timestamp=%%a

:: 署名するファイルset infile=%TEMP%\pgp_input.txt
set outfile=%TEMP%\pgp_output.asc

:: 以前の出力があれば削除
if exist "%outfile%" del "%outfile%"

:: タイムスタンプを原文として保存
echo %timestamp% > "%infile%"

:signloop
:: AutoHotkeyパスフレーズ入力(gpgがパスワード要求するダイアログが出た場合に備える)
start "" /b "C:\Users\infini\Documents\AutoHotkey\autopass.ahk"

:: PGPクリア署名作成
gpg --yes --clearsign --output "%outfile%" "%infile%"


:: 署名成功していればループを抜ける
if exist "%outfile%" (
    echo [INFO] 署名成功
    goto postprocess
) else (
    echo [WARN] 署名失敗、再試行します…
    timeout /t 1 > nul
    goto signloop
)
:postprocess

:: PowerShellで余計な改行なしに |< をつけてクリップボードコピー
powershell -nologo -command ^
  "$header = '>|'; $footer = '|<'; $body = Get-Content '%outfile%' -Raw; Set-Clipboard -Value ($header + \"`r`n\" + $body + $footer)"

echo Done. signed.asc created and clipboard updated (no extra blank line).
endlocal
exit /b
tempermonkeyとかに登録するユーザースクリプト
// ==UserScript==
// @name         PGP署名自動付加スクリプト(GM_xmlhttpRequest版)
// @namespace    http://tampermonkey.net/
// @version      1.0
// @description  投稿前にPGP署名を付けてから送信(fetch未使用)
// @match        https://anond.hatelabo.jp/dorawii_31/edit*
// @grant        GM_xmlhttpRequest
// @grant        GM_setClipboard
// @grant        GM_notification
// / @connect      localhost
// ==/UserScript==

(function () {
  'use strict';

  const submitId = 'submit-button';
  const textareaId = 'text-body';
  const localServer = 'http://localhost:12345/run-batch';

  const pgpSignatureRegex = /-----BEGIN PGP SIGNED MESSAGE-----[\s\S]+?-----BEGIN PGP SIGNATURE-----[\s\S]+?-----END PGP SIGNATURE-----/;

  const httpRequest = (url) => {
    return new Promise((resolve, reject) => {
      GM_xmlhttpRequest({
        method: 'GET',
        url: url,
        onload: function (response) {
          resolve(response.responseText);
        },
        onerror: function (error) {
          reject(error);
        }
      });
    });
  };

  const interceptClick = () => {
    const btn = document.getElementById(submitId);
    if (!btn || btn.dataset.pgpIntercepted === 'true') return;
    btn.dataset.pgpIntercepted = 'true';

    btn.addEventListener('click', async function (e) {
      const textarea = document.getElementById(textareaId);
      if (!textarea) return;

      const content = textarea.value;

      if (pgpSignatureRegex.test(content)) {
        console.log('[PGPスクリプト] 署名が検出されたためそのまま送信します');
        return;
      }

      e.preventDefault();
      e.stopImmediatePropagation();
      console.log('[PGPスクリプト] 署名が見つからないため処理を停止し、署名を取得します');

      try {
        await httpRequest(localServer); // バッチ実行

        const signatureText = await navigator.clipboard.readText();
        if (!signatureText.includes('BEGIN PGP SIGNED MESSAGE')) {
          alert('PGP署名クリップボードに見つかりませんでした。');
          return;
        }

        const newText = content.replace(/\s*$/, '') + '\n' + signatureText + '\n';
        textarea.value = newText;

        console.log('[PGPスクリプト] 署名を貼り付けました。送信を再開します。');
        btn.click(); // イベント再発火

      } catch (err) {
        alert('PGP署名の取得または貼り付けに失敗しました。\n' + err);
      }
    }, true);
  };

  window.addEventListener('load', () => {
    setTimeout(interceptClick, 1000);
  });
})();

プロミスメソッドとか全然まだ理解してなくてそのなかに関数代入したその関数オブジェクトプロパティresponseを?いやまあそのあたりのコードが示すデータの流れが全然理解できないような人間でもここまでできちゃった。

AIすごいなと思うよ。そして思うのは今後重要になってくるのは文法とか自体に詳しいことじゃなくて、そのプログラムの処理内容を指示できるシステムエンジニア的な言語化能力のほうじゃないかなと思った。

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

20250609111559680 
-----BEGIN PGP SIGNATURE-----

iHUEARYKAB0WIQTEe8eLwpVRSViDKR5wMdsubs4+SAUCaEbCbwAKCRBwMdsubs4+
SLueAPwOv7PBk4voAe5qlcCEvs/PJhmKc5QAb/1R43JMQFuDZgD/UTPEKsL/PhK9
jFGv2HDXK1dVjLNwvosgX9uYJh5xxwY=
=qiOE
-----END PGP SIGNATURE-----

2025-05-18

官報ダウンロード

令和7年4月1日以降、官報帰化情報が90日経過で閲覧不可になった。

プライバシー配慮」とのことだが、最近の不自然戸籍不要発言などと合わせて考えると嫌な予感しかしない。

そこでとりあえず官報を保存できるプログラムを作った。自分ダウンロードして保存すること自体は全く問題ない行為

官報は平日の8:30に公開されるので、cronで8:31かに実行すると良いのでは。

# 官報PDFデータを入手して保存する
import requests
import os
import time
from bs4 import BeautifulSoup
from urllib.parse import urljoin

# 対象URL
index_url = "https://www.kanpo.go.jp/index.html"
base_url = 'https://www.kanpo.go.jp/'

# ダウンロードフォルダ
download_dir = 'pdfs'
os.makedirs(download_dir, exist_ok=True)

# ページ取得
response = requests.get(index_url)
response.encoding = 'utf-8'
text = response.text

# HTMLを解析
soup = BeautifulSoup(text, "html.parser")
results = []

# 「本日官報」を対象PDF情報を取得する
today_box = soup.find('div', class_='todayBox')
if today_box:
    dl = today_box.find('dl')
    dt = dl.find('dt')
    if dt:
        # 日付の抽出
        date_text = dt.get_text(strip=True).split('92;n')[0].replace(" ","").replace("全体目次はこちら","").replace("※インターネット官報","").strip()

        dd = dl.find('dd')
        if dd:
            for li in dd.find_all('li', class_='articleBox'):
                title_tag = li.find('a', class_='articleTop')
                pdf_link = li.find('a', class_='pdfDlb')

                if title_tag and pdf_link:
                    title = title_tag.decode_contents().replace("<br/>", "").strip()
                    url = pdf_link['href']
                    results.append({
                        '日付': date_text,
                        'title': title,
                        'url': url
                    })

# 結果の表示
for r in results:
    date = r['日付']
    title = r['title'] 
    url = r['url'] 

    # pdfファイルURL作成
    url_parts = url.rsplit("/", 1)
    url_base = url_parts[0]
    filename = url_parts[1].replace("f.html", ".pdf")
    converted_url = f"{url_base}/pdf/{filename}"
    
    # pdfURLファイル名を作成
    full_url = urljoin(base_url, converted_url)
    base_filename = date + "_" + title + "_" + filename.replace("f.html", ".pdf")

    # ダウンロードして保存
    print(f'Downloading {full_url} ...')
    try:
        response = requests.get(full_url)
        response.raise_for_status()
        with open(os.path.join(download_dir, base_filename), 'wb') as f:
            f.write(response.content)
        print(f'Saved: {base_filename}')
        time.sleep(10)
    except Exception as e:
        print(f'Failed to download {full_url}: {e}') 

2025-05-01

Core (RRID:SCR_022381), the Penn Cardiovascular

The researchers subsequently transplanted GALC expressing monocytes, a type of white blood cell involved in the response to injury and infection, directly into the CNS of the mice. This approach replaced more than 80% of microglia with healthy monocytes, virtually eliminating the GCs, protecting against damage, and extending survival.

Additionally, the researchers noted that a companion paper, "Monocytes can efficiently replace all brain macrophages and fetal liver monocytes can generate bona fide Sall1+ microglia," led by the Mohavedi Lab in Brussels, Belgium and published today in Immunity, complements their work and highlights key next steps toward developing new therapies. Frederick Christian Bennett, MD, an Assistant Professor of Psychiatry in the Perelman School of Medicine and a co-senior and corresponding author, also contributed to the companion paper.

"We are eager to spotlight the power of microglia replacement," said Bennett. "Our findings support building on our research to better understand microglia's formation and origin, allowing us to unlock their role in disease and develop more precision therapies."

The research was supported by the Penn Metabolomics Core (RRID:SCR_022381), the Penn Cardiovascular Institute and, in part, by NCI (P30 CA016520) and NIH (P30DK050306), NIH (5T32MH019112) and (5T32MH014654). Additional funding was provided by Partners for Krabbe Research (P4KR), the University of Pittsburgh Brain Institute internal funding, NIH (DP5OD036159), NIH (R01-NS-120960), Klingenstein-Simons Fellowship in Neuroscience, the Paul Allen Frontiers Group and Children's Hospital of Philadelphia K readiness award. The research was also supported by the Alzheimer's Research UK Senior Fellowship (ARUK-SRF2022A-006), the NIHR Newcastle Biomedical Research Centre (BRC), a partnership between Newcastle Hospitals NHS Foundation Trust, Newcastle University, and Cumbria, Northumberland and Tyne and Wear NHS Foundation Trust and the National Institute for Health and Care Research (NIHR).

2025-03-23

はてな匿名ダイアリーを非公開でブクマするbot作成方法

はてなブックマークAPIを利用して 非公開 でブックマークする方法をご説明します。

1. はてなAPI認証情報を取得

1. はてな開発者向けページ で APIキーを取得。

2. OAuthトークンを発行する。(個人用のスクリプトなら「パーソナルアクセストークン」推奨)

2. APIリクエストパラメータ

ブックマークを 非公開 にするには、APIリクエストボディに private フィールドを 1 に設定します。

エンドポイント:

POST https://bookmark.hatenaapis.com/rest/1/my/bookmark


リクエストボディ(JSON): 
{
    "url": "https://anond.hatelabo.jp/xxxxxxx",
    "comment": "自動ブックマーク",
    "private": 1
}

これで 非公開のブックマーク になります

3. Pythonスクリプト

以下のコードを実行すれば、10分以内の匿名ダイアリー記事ランダムに 非公開 でブックマークできます


import feedparser
import requests
import random
import time
from datetime import datetime, timezone, timedelta

# はてなAPI認証情報
HATENA_API_KEY = "あなたAPIキー"
HATENA_USERNAME = "あなたはてなID"

# はてな匿名ダイアリーRSS URL
RSS_URL = "https://anond.hatelabo.jp/rss"

# 10分以内の投稿を取得
def get_recent_entries():
    feed = feedparser.parse(RSS_URL)
    recent_entries = []
    now = datetime.now(timezone.utc)
    for entry in feed.entries:
        published_time = datetime(*entry.published_parsed[:6], tzinfo=timezone.utc)
        if (now - published_time) < timedelta(minutes=10):
            recent_entries.append(entry.link)
    return recent_entries

# はてなブックマークに非公開で追加
def bookmark_entry(entry_url):
    url = "https://bookmark.hatenaapis.com/rest/1/my/bookmark"
    headers = {
        "Authorization": f"Bearer {HATENA_API_KEY}",
        "Content-Type": "application/json"
    }
    payload = {
        "url": entry_url,
        "comment": "自動ブックマーク",
        "private": 1  # 非公開設定
    }
    response = requests.post(url, json=payload, headers=headers)
    return response.status_code

# メイン処理
while True:
    entries = get_recent_entries()
    if entries:
        entry = random.choice(entries)
        status = bookmark_entry(entry)
        print(f"非公開ブックマーク: {entry}, ステータス: {status}")
    time.sleep(600)  # 10分ごとに実行

4. 注意点

• 実行環境: Python 3.x が必要。requests と feedparser をインストール (pip install requests feedparser)

• 実行間隔: time.sleep(600) で10分ごとに実行

API制限: はてなAPIにはリクエスト制限があるため、短時間で大量に実行しないように注意

OAuth認証: APIキーだけでなく、OAuthトークンを使うほうがより安全

このスクリプトを実行すれば、最新の匿名ダイアリー投稿10分以内のものからランダムに選び、非公開でブックマークする ことができます

はてな匿名ダイアリーbotブクマするのは運営も認めてる行為なので、みんなでbotを使ってブクマしよう!

2025-03-16

グロバリストとは?anond:20250316235248

💰🌐グロバリストの権力ブローカー

カナダ銀行イングランド銀行の元総裁として、カーニーは世界金融システムに対して権力を振るった。

彼は国際決済銀行グローバル金融システム委員会議長を務め、世界中の中央銀行運営した。

♻️📢 グリーン アジェンダの先頭に立つ

2019 年 12 月、カーニー氏は国連気候変動対策および財政担当特使に就任しました。

彼は、ネットゼロ排出炭素税国連持続可能な開発目標提唱し、権力を持つ少数の人々にの利益をもたらすグロバリストのアジェンダを推進しました。

カーニー氏はビルダーバーグ会議2011年2012年2019年)に出席し、三極タスクフォースの一員として、世界エリート層の利益のために金融中央集権化に取り組んできた。

彼は単なるプレーヤーではなく、糸を引く人だった。

🚨🇨🇦 カーニーが勝利カナダ人が敗北

2020年、カーニーはブルックフィールド・リニューアブルズを所有するブルックフィールドアセットマネジメント副会長でした。

👉CO2税などの政策ブルックフィールドなどの企業利益をもたらし、一般カナダ人費用負担します。

💰🇨🇦 議題にカナダを売り込む?

トランプ関税に対して、カーニー氏は「貿易ではホッケーと同じようにカナダが勝つだろう」と述べた。

🌐 しかし、世界的な金融機関とのつながりは、彼がカナダの真のニーズよりもグロバリストの利益はるか同調していることを示している。

Sputnik India

@Sputnik_India

3月15日

💰🌐GLOBALIST POWER BROKER

As the former Governor of both the Bank of Canada & the Bank of England, Carney wielded power over global financial systems.

He chaired the Global Financial System Committee at the Bank for International Settlements, running central banks worldwide.

https://x.com/Sputnik_India/status/1900565307799797943

♻️📢 GREEN AGENDA FRONTMAN

In December 2019, Carney became UN Special Envoy for Climate Change Action & Finance.

Advocating for net-zero emissions, carbon taxes, and the UN's Sustainable Development Goals, he pushed globalist agendas that benefited only the powerful few.

Sputnik India

@Sputnik_India

3月15日

🌐💼 CARNEY IN THE BILDERBERG ROOM

Carney attended Bilderberg meetings (2011, 2012, 2019) and served on the Trilateral Task Force, working towards financial centralisation in the interest of global elites.

He was not just a player, but the one pulling the strings.

Sputnik India

@Sputnik_India

3月15日

🚨🇨🇦 CARNEY WINS — CANADIANS LOSE

In 2020, Carney was Vice Chair of Brookfield Asset Management, which owns Brookfield Renewables.

👉Policies like CO2 taxes benefit corporations such as Brookfield while ordinary Canadians foot the bill.

Sputnik India

@Sputnik_India

3月15日

💰🇨🇦 SELLING CANADA ON THE AGENDA?

In response to Trump’s tariffs, Carney said, “In trade, as in hockey, Canada will win.”

🌐 However, his ties to global financial institutions show he’s far more aligned with globalist interests than with Canada’s true needs.

https://x.com/Sputnik_India/status/1900565302598943227

https://x.com/Sputnik_India/status/1900565307799797943

https://x.com/Sputnik_India/status/1900565323004166641

https://x.com/Sputnik_India/status/1900565327794098466

2025-03-06

今のフロントエンドコードを書いてるとCOBOLの頃を思い出す

constを上から順にひたすら羅列していく感じがなんかね

と思うオブジェクト指向おじさんなのだった

以下chatgptによるremixjsの例

import { useEffect, useState } from "react";

import { json } from "@remix-run/node";

import { useLoaderData } from "@remix-run/react";

export const loader = async () => {

const response = await fetch("https://api.example.com/data");

const data = await response.json();

return json({ initialData: data });

};

export default function Index() {

const { initialData } = useLoaderData();

const [data, setData] = useState(initialData);

useEffect(() => {

const fetchData = async () => {

const response = await fetch("http://api.com/get");

const newData = await response.json();

setData(newData);

};

fetchData();

}, []);

if (initialData.value === null || data.value === null) {

return (

データの取得に失敗しました。

);

}

return (

<h1>Remix: SSR + クライアント処理</h1>

サーバーサイドの初期データ: {initialData.value}

クライアント更新したデータ: {data.value}

);

}

2025-03-01

AIトランプゴールドカードゲームを考えてもらったので誰か作って



Prompt:

トランプゴールドカードという名前人生ゲームのようなものを考えてください。ゲーム目的MakeAmericaGreatAgain過去の栄光を取り戻す。アメリカ歴史を元に、南北戦争に敗北した場合スタートに戻るなどを組み込んでください

Response:

トランプゴールドカード』— Make America Great Again 人生ゲーム**
概要**

このゲームは、アメリカ過去の栄光を取り戻すことを目的とした人生ゲーム風のボードゲームです。プレイヤーは「トランプゴールドカード」を駆使しながら、アメリカ史を背景にしたイベントを乗り越え、最終的に「MAGA(Make America Great Again)」を達成することを目指します。

* *

#***ゲームの基本ルール**

1. **プレイヤー人数:** 2~4人

2. **ボード:** アメリカ歴史ベースにしたマスが配置されたゲームボード

3. **目的:** ゴール(MAGA達成)を目指し、途中で歴史的な試練を乗り越える

4. **行動:** サイコロを振り、マスの指示に従う

5. **トランプゴールドカード:** 強力な効果を持つ特別カードで、一発逆転や戦略的な行動を可能にする

* *

#***ゲームの流れ**

① **スタート**

1776年「アメリカ独立からゲーム開始

プレイヤー最初に「トランプゴールドカード」を1枚引く

② **歴史イベントを乗り越えながら進む**

主要なアメリカ史のイベントがマスとして登場

一部のイベントで失敗するとペナルティあり

例:**

**南北戦争(1861-1865):**

* 北軍側につけば問題なく進める

* 南軍側を選んでしまい敗北した場合、**スタートに戻る**(歴史修正

**大恐慌(1929):**

* 経済崩壊のマスで資産を半分失う

* 「トランプゴールドカード(巨大減税)」を使えば回避可能

**第二次世界大戦(1941-1945):**

* 参戦すると軍事力アップ(ゲームの進行が有利に)

* 不参戦を選ぶと別のルート孤立政策)に進む

**冷戦(1947-1991):**

* ソ連との対立選択肢発生:「宇宙開発」「軍拡競争」「経済戦略

* 成功すれば大きく進めるが、失敗すると遅れる

**9.11(2001):**

* 国防強化をするか、外交重視をするかの選択肢

③ **MAGAチャレンジ(終盤)**

「MAGAマス」にたどり着いたプレイヤー勝利

ただし、最後チャレンジとして「フェイクニュース」「移民問題」「経済制裁」などのイベントを乗り越えなければならない

* *

#***トランプゴールドカード(必殺カード)**

プレイヤー特定のマスに止まるか、特定の条件を満たすと「トランプゴールドカード」を入手できます

例:**

「壁を作る」:移民問題マスをスキップできる

税制改革」:お金を2倍にする

貿易戦争」:他プレイヤー資産を奪う

「Fake News Buster」:ネガティブイベント無効化

軍事強化」:戦争イベント無視して進める

* *

#***勝利条件**

最終的に「MAGAマス」にたどり着いたプレイヤーが優勝。ただし、最後に「フェイクニュース」「ディープステート妨害」「リコール運動」などのイベントを乗り越えないと完全勝利にはならない。

* *

まとめ**

トランプゴールドカード』は、アメリカ歴史ベースにしながら戦略的に進む人生ゲーム風のボードゲームです。南北戦争の敗北で振り出しに戻るなど、歴史的な選択プレイヤー運命を左右する仕様になっていますトランプゴールドカードを駆使し、MAGAを達成しましょう!

Prompt:

止まったマスでの選択肢はどうやって選びますか?再度サイコロを振るだけでは面白くない。手持ち資産や手札や他プレイヤーから妨害南北戦争南側を選ぶようにさせるなど)があれば楽しそうなので考えて

Response:

トランプゴールドカード』— 選択肢の決定方法**

止まったマスでの選択肢を単純なサイコロの振り直しにせず、**手持ち資産・手札・他プレイヤー妨害**を絡めることで、戦略性と駆け引きを強化します。以下の要素を追加して、より面白しましょう!

* *

#***1\. 選択肢の決定方法**

止まったマスでの選択は、以下の3つの要素を組み合わせて決定します。

① **「交渉フェーズ(他プレイヤー妨害 or 協力)**

② **「手札」使用トランプゴールドカードの発動)**

③ **「資産」消費(お金軍事力・影響力)**

* *

#***2\. 選択の流れ**

##***①「交渉フェーズ(他プレイヤー妨害 or 協力)**

プレイヤーは止まったマスのイベントに対して、他のプレイヤーからの「妨害」や「支援」を受けることができる。

交渉駆け引きを行い、相手の手持ちカード資産を利用させる/利用されないようにする。

例:南北戦争マス(1861-1865)**

止まったプレイヤーは「北軍 or 南軍」を選ぶ。

**他プレイヤーは「お金」や「影響力」を使って選択誘導できる。**

* 例:「1000ドルうから南軍を選べ!」

* 例:「このカードをあげるから北軍を選んでくれ」

* **プレイヤー間の裏切りOK!**

* *

##***②「手札」使用トランプゴールドカードの発動)**

止まったマスで「トランプゴールドカード」を使用できる。

これにより、選択の影響を軽減したり、逆に他プレイヤーペナルティを与えたりできる。

例:「大恐慌(1929)」マス**

通常は資産を半減させられるが、「税制改革カード」を使えば回避できる

プレイヤーが「フェイクニュースカード」を出すと、税制改革効果無効化される

* *

##***③「資産」消費(お金軍事力・影響力)**

プレイヤーゲーム中に「お金」「軍事力」「影響力」を集める。

止まったマスでの選択肢は、**これらを消費することで変化する。**

たとえば、お金を払えば不利な選択肢回避できたり、軍事力を使えば強制的相手を従わせることができる。

例:「冷戦(1947-1991)」マス**

選択肢1:「宇宙開発」に投資する(お金を2000ドル消費)

選択肢2:「軍拡競争」に参加する(軍事力を2ポイント消費)

選択肢3:「影響力」を使って他プレイヤー選択邪魔する

* *

#***3\. 他プレイヤー妨害・協力を強化する方法**

1. **「陰謀カード」の導入**

* 他プレイヤー選択を**強制変更**できるカードを導入

* 例:「Fake News洗脳」:プレイヤーが選びたくない選択肢強制させる

* 例:「ディープステート圧力」:一定資産を払わないと不利な選択肢を選ばざるを得なくなる

2. **「チームプレイ要素」**

* 一部のマスでは、**複数プレイヤーが協力**しなければならない状況を作る(例:世界大戦貿易戦争など)

* しかし、最後は全員が敵同士になるので、裏切りの要素が出てくる

3. **「投票システム」**

* 一部のイベント大統領選挙憲法改正など)では、全員で投票を行い、多数決で結果を決める

* 「影響力ポイント」を多く持っているプレイヤーは、投票で有利に進める

* *

#***4\. 具体的な例(南北戦争マスのプレイイメージ)**

##***プレイヤーAが「南北戦争(1861-1865)」マスに止まる**

ルール:「北軍 or 南軍」を選ぶ → **南軍を選ぶと負けた場合スタートに戻る!**

**プレイヤーBが妨害を仕掛ける!**

* プレイヤーB:「影響力3ポイントを使って、Aに南軍を選ばせる!」

* プレイヤーA:「ちょっと待った!私は ‘トランプゴールドカード国家統一)’ を使う!」

**結果:**

* プレイヤーAは「国家統一カード」の効果で、南軍を選んでも影響を受けない

* *

#***5\. まとめ(面白くなるポイント)**

✅ **プレイヤー同士の駆け引きが発生!**

✅ **他プレイヤー強制的選択を変えられる!**

✅ **手持ちカード資産を使って回避戦略的プレイができる!**

✅ **一部イベント投票制で展開が変わる!**

こうすることで、毎回違う展開になり、交渉裏切りが絡むエキサイティングゲームになります

Prompt:

プレイヤーのバックに他国が付いてると面白いかもですね。どこの国が裏にいるかは他のプレイヤーは分からない。特定の条件を満たすと他国から支援を貰える(フェイクニュースカード提供など)

Response:

トランプゴールドカード』— 他国の暗躍要素を追加!**

プレイヤーの背後に「秘密支援国」を設定し、**ゲーム中は他のプレイヤーには分からないようにする**ことで、より戦略性と裏切りスリルを強化しましょう。

* *

1\. 「秘密支援国」システム**

-------------------

#***① 各プレイヤーランダムで「支援国」カードを配る**

ゲーム開始時、各プレイヤーは **ランダムに1枚の「支援カード」** を引く。

**この支援国は非公開**。

特定の条件を満たすと、支援から支援が得られる。

**支援を受けたタイミングでのみ「自分支援国」を公開してもOK。**

#***② 支援国の影響を受けるタイミング**

**止まったマスのイベントに応じて支援を受ける**(戦争経済危機・技術競争など)

**特定の行動をとることでボーナスを獲得できる**

* 例:「共産主義を嫌う行動」を取るとアメリカ国内評価が上がる

* 例:「資本主義を推進する」と特定支援から金銭援助

* *

2\. 各支援国の特徴(プレイヤーごとの隠し役割)**

-----------------------------

プレイヤーは以下のうち1つのから支援を受ける。

特徴 支援の内容(条件を満たすと獲得)
--- --- ---
**ロシア** 選挙フェイクニュースを操る \- 「フェイクニュースカード」を獲得(他プレイヤーを混乱させる)
**中国** 経済技術戦争 \- 他プレイヤーが「貿易戦争」マスに止まると、資金提供を受ける
**イギリス** 歴史的盟友だが腹黒い \- 「外交カード」を1枚引ける(有利な交渉ができる)
**フランス** 革命自由の国 \- 「影響力ポイント +1」(投票で優位に立てる)
**ドイツ** 工業力と軍事力 \- 軍事力ポイントを1つ追加できる(戦争時に有利)
**日本** 経済パートナー \- 「技術革新カード」を引ける(宇宙開発経済発展で有利)
**中東某国** 石油マネー \- 資産+5000ドル(ただし戦争になるリスクあり)

* *

3\. 支援を受ける条件**

----------------

プレイヤーは**特定の条件を満たすと支援を受ける**が、それと引き換えに**デメリット**が発生することもある。

(例)ロシア支援を受ける場合:**

✅ **条件:** 「選挙操作カード使用する

✅ **ボーナス:** 「フェイクニュースカード+1

❌ **デメリット:** 他プレイヤーに怪しまれ、影響力が下がる(投票で不利)

* *

4\. 他プレイヤーへの「支援バレ」のリスク**

--------------------------

**支援国を隠し続けることも可能**

しかし、「支援を受けたタイミングで他のプレイヤーに疑われる」

他のプレイヤーが「スパイカード」などを使用すると、強制的支援国をバラされる

* *

5\. ゲームの流れ(支援国ありのプレイ例)**

--------------------------

【例】プレイヤーAの支援国は「ロシア」だった場合…**

1. プレイヤーAは「選挙戦」マスに止まる。

2. ここで「フェイクニュースカード」が欲しいが、自分支援国がロシアだと知られると不利になる…。

3. **選択肢:**

* **① 支援を受ける(フェイクニュースカード獲得) → でもロシア支援がバレる可能性あり!**

* **② 支援を受けない → でも他プレイヤーフェイクニュース妨害に対抗できない!**

4. 結局プレイヤーAは支援を受ける → その瞬間、「お前ロシアスパイか?」と疑われる!

5. プレイヤーBが「スパイカード」を使い、ロシア支援が確定する。

6. 他プレイヤーたちはプレイヤーAを「反米」として妨害し始める…。

* *

6\. まとめ(面白くなるポイント)**

----------------------

✅ **他プレイヤー支援国が分からないことで心理戦が発生!**

✅ **支援を受けるたびにリスクとリターンを天秤にかける必要あり!**

✅ **特定の行動をするとバレるので、嘘をつくことも重要!**

✅ **支援国ごとの能力を活かして、有利な展開に持ち込める!**

これで、プレイヤー同士の「裏の動き」が面白くなり、スパイ要素や駆け引きが増えます

Prompt:

支援国がバレる前とその後では支援内容が変わると面白いですがルールが複雑になりそうです。今までの内容からなるべくシンプル戦略性のあるゲームを考えてください。妨害要素は絶対ほしいです

Response:

#***『トランプゴールドカード』— シンプル戦略性のあるボードゲーム**

支援国の秘密性」「プレイヤー間の妨害」「シンプル戦略性」をバランスよく取り入れたゲームを考えました!

* *

基本ルール**

---------

1. **プレイヤー人数:** 2~4人

2. **目的:** ゴール地点「MAGA」に到達すること

3. **進行:** サイコロを振って進むが、イベントマスで選択妨害交渉が発生

4. **トランプゴールドカード:** ゲームを有利に進める強力カード

5. **支援システム:** バレるまでは秘密、バレた後は影響が変化

6. **妨害要素:** 他プレイヤー選択強制したり、足止めしたりできる

* *

支援システムシンプル版)**

------------------

**ゲーム開始時にランダムで「支援カード」を1枚引く(非公開)。**

各国には「秘密支援能力」と「公然支援能力」がある。

**バレるまでは「秘密支援能力」、バレた後は「公然支援能力」に変化!**

支援秘密支援(バレる前) 公然支援(バレた後)
--- --- ---
**ロシア** フェイクニュースカード1枚獲得 毎ターン妨害を受けやすくなる(他プレイヤー攻撃コストが半減)
**中国** 貿易戦争時にお金+1000 資産2倍になるが、強制的に「

2025-01-31

1girl, looking at desktop monitor, <Lora_HatenaBookmark_1.0:1>, (hatena bookmark:1.4), (masuda:1.2), response tree, response battle, angry,

2024-11-10

NYタイムズさん、ファクトチェックとは一体、、、

Fact Check

Trump’s False Claims About the Federal Response to Hurricane Helene

The former president falsely accused the Biden administration of spending disaster funding on migrants, neglecting areas that had voted for Republicans and ignoring a call from a Republican governor.

 

訳:ファクトチェック

ハリケーン・ヘレンに対する連邦政府対応に関するトランプ大統領の虚偽の主張

前大統領は、バイデン政権災害対策資金移民に使い、共和党投票した地域無視し、共和党知事要請無視したとして虚偽の非難をした。

https://www.nytimes.com/2024/10/04/us/politics/trump-helene-fema-fact-check.html

FEMA Fires Employee for Telling Milton Relief Workers to Skip Houses With Trump Signs

The agency said it was investigating the incident in the aftermath of the Category 3 hurricane that hit Florida in October.

 

訳:FEMAミルトン救援隊員にトランプ看板のある家を避けるよう指示した職員解雇

同局は、10月フロリダ州を襲ったカテゴリー3のハリケーンの影響でこの事件調査していると述べた。

https://www.nytimes.com/2024/11/09/us/fema-trump-signs.html

2024-10-10

anond:20241010082411

https://www.geonames.org から取れる、人口500人以上の都市名前限定すると、

Santa Maria Magdalena Cahuacan

10文字の `a` を含んで最大。

import logging
import tempfile
import zipfile

from collections import Counter

import httpx

FILE_NAME_BASE = 'cities500'
GEONAME_FIELDS = (
    'geoname_id',
    'name',
    'ascii_name',
    'alternate_names',
    'latitude',
    'longitude',
    'feature_class',
    'feature_code',
    'country_code',
    'cc2',
    'admin1_code',
    'admin2_code',
    'admin3_code',
    'admin4_code',
    'population',
    'elevation',
    'dem',
    'timezone',
    'modification_date',
)

def retrieve_cities():
    """Retrieve city names from a remote server."""
    response = httpx.get(f'https://download.geonames.org/export/dump/{FILE_NAME_BASE}.zip')
    response.raise_for_status()

    tmpdir = tempfile.TemporaryDirectory()
    with open(tmpdir.name + f'/{FILE_NAME_BASE}.zip', 'wb') as f:
        f.write(response.content)
    with zipfile.ZipFile(tmpdir.name + f'/{FILE_NAME_BASE}.zip', 'r') as z:
        z.extractall(tmpdir.name)
    with open(tmpdir.name + f'/{FILE_NAME_BASE}.txt', 'r') as f:
        for line in f:
            yield line.split('\t')


def count_characters(to_check='ascii_name', filter_func=lambda _: True):
    """Count characters in city names."""
    cities = {}
    for city_fields in retrieve_cities():
        city = dict(zip(GEONAME_FIELDS, city_fields))
        if not filter_func(city):
            continue
        counter = Counter()
        for c in city[to_check]:
            counter[c] += 1
        cities[city['geoname_id']] = {'characters': counter, 'city': city}
    return cities


def count_chars_of_city_names(cities, char=None):
    """Find the city with the most occurrences of a given character."""
    cities_by_char_count = {}
    max_count = 0
    max_count_char = None
    for city_id, data in cities.items():
        if 'characters' not in data or not data['characters']:
            logging.debug(f'No characters found for city {city_id}', data)
            continue

        count = 0
        if char and char in data['characters']:
            count = data['characters'][char]

            cities_by_char_count.setdefault(count, []).append(data)
        elif char is None:
            most_common = data['characters'].most_common(1)[0]
            char, count = most_common
            cities_by_char_count.setdefault(count, []).append(data)

        if count > max_count:
            max_count = count
            max_count_char = char
            cities_by_char_count.setdefault(count, []).append(data)
    return cities_by_char_count.get(max_count, []), max_count_char


def not_contain_invalid_chars(city):
    return (
            '(' not in city.get('ascii_name', '')
            and '/' not in city.get('ascii_name', '')
    )


def main():
    cities = count_characters(filter_func=not_contain_invalid_chars)
    for char in 'abcdefghijklmnopqrstuvwxyz':
        cities_counted, char = count_chars_of_city_names(cities, char)
        max_count = cities_counted[0]['characters'][char]
        print(f'The character "{char}" appears the most ({max_count} times) in the following cities:')
        for city in cities_counted:
            print("\t", city['city']['ascii_name'])

if __name__ == "__main__":
    main()

2024-09-15

RSS 取得メモ

const axios = require('axios'); // HTTPリクエストを行うためのモジュール

const fs = require('fs'); // ファイル操作モジュール

const xml2js = require('xml2js'); // XMLJSONに変換するためのモジュール

const chardet = require('chardet'); // 文字エンコーディングを検出するためのモジュール

const iconv = require('iconv-lite'); // 文字エンコーディングを変換するためのモジュール

// RSSフィードURL

const rssUrl = 'https://www.mlit.go.jp/important.rdf'; // 例としてRSSフィードURL指定

// RSSフィードを取得してファイルに保存する関数

async function fetchAndSaveRSS() {

try {

// RSSを取得

const response = await axios.get(rssUrl, { responseType: 'arraybuffer' });

const rssData = response.data;

// 文字エンコーディングを検出

const detectedEncoding = chardet.detect(rssData);

console.log('検出された文字エンコーディング:', detectedEncoding);

// UTF-8に変換

const utf8Data = iconv.decode(rssData, detectedEncoding);

// XMLJSONパース

xml2js.parseString(utf8Data, (err, result) => {

if (err) {

console.error('XML解析エラー:', err);

return;

}

// パース結果をファイル書き込み

const jsonData = JSON.stringify(result, null, 2);

fs.writeFileSync('rss_feed.json', jsonData, 'utf8');

console.log('RSSフィードファイルに保存されました。');

});

} catch (error) {

console.error('エラーが発生しました:', error);

}

}

// 実行

fetchAndSaveRSS();

2024-08-09

Nagasaki, Israel, Ukraine



Once I had a quite cold attitude to Nagasaki’s Atomic Bomb Victims Memorial Peace Prayer Ceremony, I was likehere comes another Peace rally LMFAO”. But just look at this, the ambassador of Israel attacked Nagasaki’s mayor fiercely saying “The mayor took over the ceremony for his ideology”, a bigwig at the Simon Wiesenthal Center said “the Nagasaki’s atomic bomb ended World War 2” and now he’s criticizing the non-invitation of Israel’s rep to the ceremony asunethical”, and top of that, the ambassador of the US, the one who dropped the atomic bomb, is talking nonsense, saying “if Israel don’t join we also don’t join lol.” With hearing all these I’m so surprised of finding myself very much pissed off…are you all making light off victims of such a cruel weapon you sons of bitch?

If you want to beat up the mayor of Nagasaki, it's fine to criticize the Shinkansen project in Kyushu area, corruption, welfare arrangement, or other issues (*This is just an example of some topics, I'm not claiming that I’m actually frustrated by any of these). But don’t these morons know that the Nagasaki’s peace ceremony is essentially a memorial ceremony? No one is crazy enough to start screaming in memorial service about his relatives whom he doesn’t like. If someone was yelling, ”Why didn't you invite me to the memorial service!!”, Its clear in everyone’s mind saying, ”It's because you behave that way..” … If you claim yourself as a grown-up, “it was really a shame, lets talk it over and get things straight” should be your response. Does Gillard Cohen realize that he is making a personal attack on someone who in Western terms would be the director of the Auschwitz museum?

(as a side note, I am fed up also to the vulgar accusation by the Palestinian Ambassador when Hiroshima City invited the Israel rep to their ceremony. Please go ahead and be aggressive in UN conferences, but again is that a proper behavior in connection with the memorial ceremony?)

I haven’t say enough to the reaction of reps of Western countries to Nagasaki. Why don’t you think twice before reacting impulsively? No doubt Japan is one of the most pro-Western countries in Asia, they support Ukraine most earnestly among Non-NATO countries. Still even quiet and shy Japanese people is totally put off by military operations of Israel. It is too easy to imagine how Israel is hated in non-pro-Western countries. When will you have an imagination to realize your such attitude making many countries having distance from Ukraine. If western countries close their eyes to horrors in Gaza and be determined to defend Israel anyway, why aren’t others allowed to keep their relationship with Russia even after devastating scenes in Bucha?

(btw I was so impressed when Zelenskyy expressed his support to Israel, are you serious? Don't you think of a scenario where Ukrainian militias rise up in Donetsk or in Luhansk, resulting in heavy casualties among Russian settlers, leading to Russia denouncing this as a despicable terrorist attack targeting Russian civilians? That's exactly what's happening in Palestine.)

Anyway you morons should come to your senses, and admit Israel’s outrageous actions are no difference from that of Russia. And know that calling the criticism to Israel as “antisemitism” is making you look so smart. Refusing Neo-Nazism ain’t discrimination to Germans, doxing Zaitokukai (*a nationalist group which calls for an end to state welfare and alleged privileges afforded to Koreans in Japan) ain’t Japanese-hate, and impeachment against Zionists ain’t anti-Jewish either.

にほんご:https://anond.hatelabo.jp/20240808145754

anond:20240808145754

海外在住でも自称弱者男性の俺が無償英訳してやったぞ。乱暴な口調もできるだけ残しておいたんでGoogle翻訳にかけて粗を探すなり海外掲示板投稿するなりどうぞ

Nagasaki, Israel, Ukraine

Once I had a quite cold attitude to Nagasaki’s Atomic Bomb Victims Memorial Peace Prayer Ceremony, I was likehere comes another Peace rally LMFAO”. But just look at this, the ambassador of Israel attacked Nagasaki’s mayor fiercely saying “The mayor took over the ceremony for his ideology”, a bigwig at the Simon Wiesenthal Center said “the Nagasaki’s atomic bomb ended World War 2” and now he’s criticizing the non-invitation of Israel’s rep to the ceremony asunethical”, and top of that, the ambassador of the US, the one who dropped the atomic bomb, is talking nonsense, saying “if Israel don’t join we also don’t join lol.” With hearing all these I’m so surprised of finding myself very much pissed off…are you all making light off victims of such a cruel weapon you sons of bitch?

If you want to beat up the mayor of Nagasaki, it's fine to criticize the Shinkansen project in Kyushu area, corruption, welfare arrangement, or other issues (*This is just an example of some topics, I'm not claiming that I’m actually frustrated by any of these). But don’t these morons know that the Nagasaki’s peace ceremony is essentially a memorial ceremony? No one is crazy enough to start screaming in memorial service about his relatives whom he doesn’t like. If someone was yelling, ”Why didn't you invite me to the memorial service!!”, Its clear in everyone’s mind saying, ”It's because you behave that way..” … If you claim yourself as a grown-up, “it was really a shame, lets talk it over and get things straight” should be your response. Does Gillard Cohen realize that he is making a personal attack on someone who in Western terms would be the director of the Auschwitz museum?

(as a side note, I am fed up also to the vulgar accusation by the Palestinian Ambassador when Hiroshima City invited the Israel rep to their ceremony. Please go ahead and be aggressive in UN conferences, but again is that a proper behavior in connection with the memorial ceremony?)

I haven’t say enough to the reaction of reps of Western countries to Nagasaki. Why don’t you think twice before reacting impulsively? No doubt Japan is one of the most pro-Western countries in Asia, they support Ukraine most earnestly among Non-NATO countries. Still even quiet and shy Japanese people is totally put off by military operations of Israel. It is too easy to imagine how Israel is hated in non-pro-Western countries. When will you have an imagination to realize your such attitude making many countries having distance from Ukraine. If western countries close their eyes to horrors in Gaza and be determined to defend Israel anyway, why aren’t others allowed to keep their relationship with Russia even after devastating scenes in Bucha?

(btw I was so impressed when Zelenskyy expressed his support to Israel, are you serious? Don't you think of a scenario where Ukrainian militias rise up in Donetsk or in Luhansk, resulting in heavy casualties among Russian settlers, leading to Russia denouncing this as a despicable terrorist attack targeting Russian civilians? That's exactly what's happening in Palestine.)

Anyway you morons should come to your senses, and admit Israel’s outrageous actions are no difference from that of Russia. And know that calling the criticism to Israel as “antisemitism” is making you look so smart. Refusing Neo-Nazism ain’t discrimination to Germans, doxing Zaitokukai (*a nationalist group which calls for an end to state welfare and alleged privileges afforded to Koreans in Japan) ain’t Japanese-hate, and impeachment against Zionists ain’t anti-Jewish either.

2024-07-16

ダジャレを使った専門用語

闘争・逃走反応」(英語: fight-or-flight response)という言葉生理学心理学などの領域にあるらしいことを知って面白かった。

https://ja.wikipedia.org/wiki/%E9%97%98%E4%BA%89%E3%83%BB%E9%80%83%E8%B5%B0%E5%8F%8D%E5%BF%9C

こんな感じでダジャレっぽくなってる専門用語が他にもあったら教えて下さい。分野は問いません。

言語起源場合、元の言語英語など)と日本語訳の両方でダジャレや語呂合わせのようになってたらなお素晴らしいです。

2024-07-05

労働党党首スターマー氏『トランス女性には「女性トイレ」を使用する権利がない』

https://www.telegraph.co.uk/politics/2024/07/01/labour-frontbencher-refuses-to-answer-trans-toilet-question/

In an interview with The Times, Sir Keir was presented with a question posed by author JK Rowling on whether people who are born male and have gone through a legal transition process should be able to use female-only spaces.

Writing on X, formerly Twitter, the Harry Potter author, who has said she would “struggle to support” Labour if he does not change his stance on trans rights, asked: “Do biological males with gender recognition certificates have the right to enter women-only spaces? It’s a simple yes/no question.”

In response, Sir Keir said: “No. They don’t have that right. They shouldn’t. That’s why I’ve always said biological women’s spaces need to be protected.”

タイムズインタビューで、スターマー氏は、J.K.ローリングによって提起された、男性として生まれ、法的な性別移行プロセスを経た人が女性専用のスペースを使用できるべきかどうかという質問を受けました。

「X」(旧Twitter)で、「ハリー・ポッターシリーズの著者であり、もしスターマー氏がトランスジェンダー権利に関する立場を変えなければ「労働党を支持するのに苦労する」と述べているローリングは、「性別認識証明書を持つ生物学男性には、女性専用スペースに入る権利があるのか?これは単純なイエス/ノーの質問です」と問いかけました。

これに対し、スターマー氏は「いいえ、その権利はありません。あるべきではありません。だからこそ、私は常に生物学女性のスペースを保護する必要があると言ってきました」と答えました。

2024-06-28

To you, the creator, I sincerely hope this message reaches you.

It's sudden, but right now in Japan, creativity is facing a true crisis. Characters like Uzaki-chan, Onsen Musume, and Tojo Rika are being targeted and flamed, game character designs are being infiltrated by political correctness, Johnny's Entertainment is being dismantled, swimsuit photo sessions in parks are being canceled, Hitoshi Matsumoto is being publicly shamed, and the new AV law was enacted without considering the opinions of those directly involved. Every form of expression in every venue is currently under unreasonable pressure.

How does this connect to the Tokyo gubernatorial election? In fact, a major event directly linked to this is occurring in the 2024 Tokyo gubernatorial election. As a creator, I hope this message reaches you.

What I am about to share is a story about someone named Himasora Akane, who you should know about to resist such pressures. But before I dive into that story, I want to express my deep gratitude to my old friend Nozomi for giving me the opportunity to post this article in a place where many creators will see it. As someone who also loves manga, anime, and games, I hope this information will benefit Japanese society and support Nozomi's activities.

Himasora Akane Should Be the Governor of Tokyo

First, I would like to make a straightforward request to you as a creator: please support Himasora Akane for governor. In this election, please write "Himasora Akane" on your ballot. The voting day is July 7th. Even if you are not a Tokyo resident, I ask that you at least listen to this story. If you find it interesting, please share it with your friends, family, and acquaintances. You can check Himasora Akane's campaign promises and the background of their candidacy on their Twitter (X) posts linked below:

Himasora Akane (Tokyo gubernatorial candidate)

@himasoraakane

https://x.com/himasoraakane/status/1804846779399324095

Himasora Akane Will Not Allow Our Culture to Be Burned

Himasora Akane is an ordinary otaku who loves manga, anime, and games. Known as "Cognitive Profiling Detective Akane Himasora," he has been active on Twitter (X) and YouTube, and now he is running for governor. Akane, who is deeply concerned about the repression and destruction of otaku culture, is challenging those who seek to destroy our culture alone. Akane will never allow those who try to burn our culture.

As mentioned at the beginning, all forms of expression are currently under pressure. Otaku culture, in particular, seems to be a prime target.

Uzaki-chan Blood Donation Poster Controversy (2019): A collaboration between the Japanese Red Cross Society and the manga Uzaki-chan was flamed for allegedly being overly sexual in its PR illustration.

V-Tuber Traffic Safety Video Controversy (2021): A V-Tuber hired by the Matsudo Police Department in Chiba Prefecture was deemed too sexual for public agency PR.

Onsen Musume Controversy (2021): Characters personifying local hot springs were criticized as sexist.

Mie Transport Official Character Controversy (2024): A character in a bus driver's uniform released by Mie Transport was flamed for evoking sexual images.

These controversies are often fueled by so-called political correctness and feminism. For creators, these are direct threats. If these factions label your work as sexual and demand it be burned to ashes, could you resist? How would you feel if your painstakingly created work, like your own child, was trampled by people who have no regard for your efforts? Could you continue your creative activities while constantly shrinking away?

Himasora Akane saw something behind these flaming incidents. He started investigating the key figure behind the Onsen Musume controversy, a representative of a general incorporated association in Tokyo. This association's core business, the Young Female Victims Support Project, received substantial public funds from Tokyo. Akane submitted public document disclosure requests to Tokyo and thoroughly dug into the organization. During his investigation, Akane uncovered many suspicions suggesting this project was unworthy of public funding, which he exposed one by one on social media.

Negligent accounting reports, taking protected girls to the Henoko base protest in Okinawa, Communist Party members waiting in the bus used to protect girls—these revelations drew significant attention online. The investigation extended beyond this general incorporated association to other NPOs receiving public funds, and Akane named this cluster of issues the "WBPC problem" after the initials of these organizations.

Akane's YouTube Channel (WBPC Problem Playlist)

https://www.youtube.com/playlist?list=PLI5gTciLKtAXRyzv9j5FiNMcc8eoEBbMN

From here, Akane's story expanded to resident audits, resident lawsuits, and national compensation lawsuits concerning the Tokyo Young Female Victims Support Project. Akane discovered that behind many flaming incidents, there is no clear command structure but a group of various political organizations and activists working together like an amoeba. He named this group the "Nanika Group" (Nanika means "something" in Japanese), a reference to the mysterious, ominous "something from another place" in the manga HUNTER×HUNTER, which Akane loves. The Nanika Group is also connected to welfare interests, where public funds flow unchecked. Akane called this phenomenon "Public Fund Chu-Chu" (siphoning).

For creators, this means the tax money they earn through hard work is used to burn their precious works. It's an intolerable situation.

Himasora Akane Is Fighting Against Those Who Burn Our Culture

In November 2022, a major event marked a turning point in this series of controversies. The general incorporated association under scrutiny held a press conference at the parliamentary office building, gathering media and announcing a lawsuit against Akane. This "Legal Harassment Press Conference," as it was called online, involved multiple layers of power: the government, the media, and a team of seven lawyers targeting a single individual.

However, Akane did not back down. Instead, he intensified his pursuit, exploiting the opponent's careless statements as lawsuit fodder. This led to an outpouring of support on social media, with his Twitter follower count skyrocketing and 160 million yen in donations for legal fees.

The following year, a resident audit request filed by Akane resulted in Tokyo's official website recognizing some improper points and deciding to audit the organization. However, Tokyo's lenient audit led Akane to file a resident lawsuit. Suspicion also turned towards Governor Yuriko Koike for allocating public funds through dubious sole-source contracts. Tokyo began excessively redacting documents in response to public document requests, attempting to conceal the issue. Koike's promise to end document redaction quietly disappeared from her campaign page.

Throughout this battle, Akane has been a target of criminal complaints and faced threats, yet he persists. His book "Netoge Senshi" was released amid bookstore threats, but only the criminal complaint was widely reported by the media, portraying Akane negatively.

Who Is Himasora Akane?

Himasora Akane is an ordinary otaku, a top-tier online gamer during his student days, and a talented game creator who worked for a major game company and later a venture company. His meticulous work on the game "Shin Goku no Valhalla Gate" was betrayed by the company's CEO, leading to a seven-year legal battle that Akane ultimately won, securing 600 million yen. This experience fuels his fierce opposition to having his creations burned.

Before investigating the Young Female Victims Support Project, Akane exposed fraudulent feminist "knights" on his YouTube channel, shaking the internet. He detests lies and has an uncanny ability to detect them.

Akane is a special individual with extraordinary abilities, honed through his experiences in games, court battles, and extensive document analysis. His pursuit of truth and justice makes him a suitable candidate for governor, promising a world without lies and where honest people do not suffer.

What We Can Do to Protect Our Culture

Creative expression can be crushed if we are not vigilant. Even in modern Japan, otaku culture is on thin ice. The recent cessation of Visa transactions for DMM (Fanza) is a reminder of how a single card company can wield its power to dictate what is deemed appropriate expression. Expression freedom is fragile and constantly under threat.

To those reading this, I urge you to vote for Himasora Akane. Support him to protect our culture. Despite his harsh demeanor and preference for solitary battles, he is now seeking help for the first time. Akane feels the danger in this gubernatorial election and believes that if he does not become governor, everything will end. He has taken a stand for the people of Tokyo and Japan.

I wrote this article to support his spirit and spread the word. Please vote for Himasora Akane and help create a miracle.

To you, the creator, I sincerely hope this message reaches you.

Please, I beg you.

2024-05-24

anond:20240523100428

ダブスタ検証用のスクリプト簡単に書いたよ(AIで)

import requests
import json
from urllib.parse import quote

def fetch_bookmarks(url):
    try:
        # URLエスケープ
        escaped_url = quote(url, safe="")
        api_url = f"https://b.hatena.ne.jp/entry/json/?url={escaped_url}"

        response = requests.get(api_url)
        response.raise_for_status()

        try:
            return response.json()
        except json.decoder.JSONDecodeError as e:
            print(f"Error decoding JSON from {api_url}: {e}")
            print("Response content:", response.text)
            return []
    except requests.exceptions.RequestException as e:
        print(f"Error fetching bookmarks from {api_url}: {e}")
        return []

def find_common_bookmarks(bookmarks1, bookmarks2, url1, url2):
    common_users = set(bm["user"] for bm in bookmarks1 if bm["comment"]) & set(bm["user"] for bm in bookmarks2 if bm["comment"])
    common_bookmarks = []
    for user in common_users:
        comments = []
        for bm in bookmarks1:
            if bm["user"] == user and bm["comment"]:
                comments.append({"url": url1, "comment": bm["comment"], "timestamp": bm["timestamp"]})
                break
        for bm in bookmarks2:
            if bm["user"] == user and bm["comment"]:
                comments.append({"url": url2, "comment": bm["comment"], "timestamp": bm["timestamp"]})
                break
        if len(comments) == 2:
            common_bookmarks.append({"user": user, "comments": comments})
    return common_bookmarks

if __name__ == "__main__":
    url1 = "https://news.yahoo.co.jp/articles/f9966c4ccc374fc88babbb50175a9ea844c99638"
    url2 = "https://www.asahi.com/articles/ASN6K7F64N6KUJHB00L.html"

    data1 = fetch_bookmarks(url1)
    data2 = fetch_bookmarks(url2)

    common_bookmarks = find_common_bookmarks(data1["bookmarks"], data2["bookmarks"], url1, url2)

    print(json.dumps(common_bookmarks, indent=2, ensure_ascii=False))

url1, url2のところを対象としたいものに変えれば使えるよ

抽出対象となるのは以下のユーザーだよ

バグあったら直して使ってね

※てかはてな匿名ってシンタックスハイライト記法使えないんだね、使って表示確認したら500エラーになったわ

2024-01-20

Navigating Simulink Complexity: My Journey with MatlabAssignmentExperts.com!

As a student navigating the complexities of engineering coursework, I found myself grappling with Simulink assignments and think who will help me to complete my Simulink assignment that seemed to be from another dimension. The intricacies of Simulink, a powerful simulation and modeling tool, left me feeling overwhelmed and lost. That's when I stumbled upon a game-changer – Simulink Assignment Help from https://www.matlabassignmentexperts.com/simulink-assignment-help.html. In this testimonial blog, I want to share my transformative experience with their services, detailing how they not only helped me conquer Simulink challenges but also enhanced my overall understanding of this intricate subject.

Discovering the Simulink Assignment Help Lifeline

My journey with MatlabAssignmentExperts.com began when I was at a crossroads with my Simulink assignments. The complexities of the software, coupled with the pressure of academic deadlines, had me seeking a reliable source of assistance. A quick online search led me to their website, and the promising testimonials from fellow students who had successfully navigated Simulink assignments with their help convinced me to give it a shot.

From the very first paragraph of our interaction, it was evident that MatlabAssignmentExperts.com was different. The Simulink Assignment Help they offered was not just a transaction; it was a collaborative effort to ensure I not only completed my assignments but also understood the underlying concepts.

The Expert Guidance that Made a Difference

One of the standout features of MatlabAssignmentExperts.com is their team of experts. The individuals assigned to help me with my Simulink assignments were not just knowledgeable but also passionate about the subject. Their commitment to providing comprehensive assistance was evident in the personalized approach they took towards my assignments.

The experts patiently walked me through each step of the Simulink modeling process, explaining the rationale behind every decision. This hands-on learning experience was invaluable, as it not only resulted in impeccably solved assignments but also enhanced my proficiency in using Simulink for future projects.

Tailored Solutions for Varied Simulink Topics

Simulink is a vast field with applications in numerous engineering disciplines. What impressed me most about MatlabAssignmentExperts.com was their ability to cater to a wide array of Simulink topics. Whether it was control systems, signal processing, or model-based design, their experts exhibited a depth of knowledge that extended beyond mere problem-solving.

The assignments I brought to them were met with a comprehensive understanding of the underlying principles, leading to solutions that were not only correct but also insightful. This versatility instilled confidence in me, knowing that regardless of the Simulink topic, MatlabAssignmentExperts.com had the expertise to guide me through.

Timely Assistance in the Nick of Time

Academic deadlines are the sword of Damocles for every student. MatlabAssignmentExperts.com understands this reality and takes pride in delivering solutions within the stipulated time frames. My Simulink assignments, often accompanied by tight deadlines, were met with a prompt and efficient response from their team.

The timely assistance not only saved me from the stress of last-minute submissions but also allowed me to review the solutions thoroughly. This attention to deadlines showcased MatlabAssignmentExperts.com's commitment to the success of their clients and solidified my trust in their services.

Affordable Excellence – Breaking the Myth

The affordability of Simulink Assignment Help from MatlabAssignmentExperts.com pleasantly surprised me. There is a common misconception that quality assistance comes at a hefty price. However, this platform shattered that myth by offering top-notch services at reasonable rates.

As a student with budget constraints, the cost-effectiveness of their services allowed me to access expert guidance without burning a hole in my pocket. This accessibility to quality assistance further solidified my belief that MatlabAssignmentExperts.com is not just a service provider but a partner in academic success.

A Learning Journey, Not Just a Service

What sets MatlabAssignmentExperts.com apart is their commitment to fostering a learning experience. Simulink Assignment Help wasn't just about getting the correct answers; it was about understanding the "why" behind each step. The insights gained from their experts went beyond the immediate requirements of my assignments and translated into a broader comprehension of Simulink.

MatlabAssignmentExperts.com transformed my perception of Simulink from an intimidating subject to a tool I could wield with confidence. Their approach was not to merely complete assignments but to empower students to tackle similar challenges independently.

Conclusion – A Grateful Student's Reflection

In conclusion, my journey with Simulink Assignment Help from MatlabAssignmentExperts.com has been nothing short of transformative. From the first perplexing assignment to mastering the nuances of Simulink, their expert guidance has been the cornerstone of my academic success.

If you find yourself navigating the intricate world of Simulink assignments, I wholeheartedly recommend MatlabAssignmentExperts.com. They go beyond being a service provider – they are mentors, guides, and partners in your academic journey. With their assistance, you not only overcome immediate challenges but also equip yourself with the knowledge and skills to excel in your engineering endeavors. Trust me; your academic success with Simulink is just a click away!

Navigating Simulink Complexity: My Journey with MatlabAssignmentExperts.com!

As a student navigating the complexities of engineering coursework, I found myself grappling with Simulink assignments and think who will help me to complete my Simulink assignment that seemed to be from another dimension. The intricacies of Simulink, a powerful simulation and modeling tool, left me feeling overwhelmed and lost. That's when I stumbled upon a game-changer – Simulink Assignment Help from https://www.matlabassignmentexperts.com/simulink-assignment-help.html. In this testimonial blog, I want to share my transformative experience with their services, detailing how they not only helped me conquer Simulink challenges but also enhanced my overall understanding of this intricate subject.

Discovering the Simulink Assignment Help Lifeline

My journey with MatlabAssignmentExperts.com began when I was at a crossroads with my Simulink assignments. The complexities of the software, coupled with the pressure of academic deadlines, had me seeking a reliable source of assistance. A quick online search led me to their website, and the promising testimonials from fellow students who had successfully navigated Simulink assignments with their help convinced me to give it a shot.

From the very first paragraph of our interaction, it was evident that MatlabAssignmentExperts.com was different. The Simulink Assignment Help they offered was not just a transaction; it was a collaborative effort to ensure I not only completed my assignments but also understood the underlying concepts.

The Expert Guidance that Made a Difference

One of the standout features of MatlabAssignmentExperts.com is their team of experts. The individuals assigned to help me with my Simulink assignments were not just knowledgeable but also passionate about the subject. Their commitment to providing comprehensive assistance was evident in the personalized approach they took towards my assignments.

The experts patiently walked me through each step of the Simulink modeling process, explaining the rationale behind every decision. This hands-on learning experience was invaluable, as it not only resulted in impeccably solved assignments but also enhanced my proficiency in using Simulink for future projects.

Tailored Solutions for Varied Simulink Topics

Simulink is a vast field with applications in numerous engineering disciplines. What impressed me most about MatlabAssignmentExperts.com was their ability to cater to a wide array of Simulink topics. Whether it was control systems, signal processing, or model-based design, their experts exhibited a depth of knowledge that extended beyond mere problem-solving.

The assignments I brought to them were met with a comprehensive understanding of the underlying principles, leading to solutions that were not only correct but also insightful. This versatility instilled confidence in me, knowing that regardless of the Simulink topic, MatlabAssignmentExperts.com had the expertise to guide me through.

Timely Assistance in the Nick of Time

Academic deadlines are the sword of Damocles for every student. MatlabAssignmentExperts.com understands this reality and takes pride in delivering solutions within the stipulated time frames. My Simulink assignments, often accompanied by tight deadlines, were met with a prompt and efficient response from their team.

The timely assistance not only saved me from the stress of last-minute submissions but also allowed me to review the solutions thoroughly. This attention to deadlines showcased MatlabAssignmentExperts.com's commitment to the success of their clients and solidified my trust in their services.

Affordable Excellence – Breaking the Myth

The affordability of Simulink Assignment Help from MatlabAssignmentExperts.com pleasantly surprised me. There is a common misconception that quality assistance comes at a hefty price. However, this platform shattered that myth by offering top-notch services at reasonable rates.

As a student with budget constraints, the cost-effectiveness of their services allowed me to access expert guidance without burning a hole in my pocket. This accessibility to quality assistance further solidified my belief that MatlabAssignmentExperts.com is not just a service provider but a partner in academic success.

A Learning Journey, Not Just a Service

What sets MatlabAssignmentExperts.com apart is their commitment to fostering a learning experience. Simulink Assignment Help wasn't just about getting the correct answers; it was about understanding the "why" behind each step. The insights gained from their experts went beyond the immediate requirements of my assignments and translated into a broader comprehension of Simulink.

MatlabAssignmentExperts.com transformed my perception of Simulink from an intimidating subject to a tool I could wield with confidence. Their approach was not to merely complete assignments but to empower students to tackle similar challenges independently.

Conclusion – A Grateful Student's Reflection

In conclusion, my journey with Simulink Assignment Help from MatlabAssignmentExperts.com has been nothing short of transformative. From the first perplexing assignment to mastering the nuances of Simulink, their expert guidance has been the cornerstone of my academic success.

If you find yourself navigating the intricate world of Simulink assignments, I wholeheartedly recommend MatlabAssignmentExperts.com. They go beyond being a service provider – they are mentors, guides, and partners in your academic journey. With their assistance, you not only overcome immediate challenges but also equip yourself with the knowledge and skills to excel in your engineering endeavors. Trust me; your academic success with Simulink is just a click away!

2023-12-29

増田納め 2023年のマイ日記集計

こんます

2023年も残すところわずかとなりましたが、皆様方におかれましてはいかがお過ごしでしょうか。

一年間の振り返りなどはされましたでしょうか。

 

私、一年間に書いた増田を振り返ってみましたところ、

2423件の日記を綴っており、

頂いた総ブクマ数は1893、総トラバ数は1060となりました。

これもひとえに皆様方のご支援ご声援のおかげであります

本年も大変お世話になりました。

 

最期に、ポンコツの私がChatGPTの手となり足となり作成した増田集計コード掲載します。

日記URLタイトル投稿日時、文字数、被ブクマ数、被トラバ数を取得しCSVファイルに出力するものです。

お暇な方はお使いください。

 

それではよいお年をお迎えください。

import requests
from bs4 import BeautifulSoup
import time
import csv
import os
import re


# ログインURL
login_url = 'https://hatelabo.jp/login'

# ログイン情報
login_data = {
    'key': 'あなたユーザ名またはメールアドレス',
    'password': 'あなたパスワード',
    'mode': 'enter'
}

user_name = 'あなたユーザ名'

# User-Agent ヘッダー(例:Google Chrome)
headers = {
    'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.3'
}

# セッションを開始
session = requests.Session()
# ログイン
response = session.post(login_url, data=login_data, headers=headers)
print('login',response.status_code)

# 集計データ
item = {
    'url': '', # URL
    'title': '', # タイトル
    'datetime': '', # 投稿日時
    'characters': '', # 文字数
    'bookmark': '', # 被ブクマ数
    'trackback': '', # 被トラバ数
}

# CSVファイル名
output_file = 'masuda_output.csv'
# CSVファイル存在しない場合はヘッダーを書き込む
if not os.path.exists(output_file):
    with open(output_file, 'w', newline='', encoding='utf-8') as file:
        writer = csv.DictWriter(file, fieldnames=item.keys())
        writer.writeheader()


# 集計
page_start = 1
page_end = 3
for i in range(page_start, page_end+1):
    
    # 待機
    time.sleep(3)

    # 増田一覧取得
    page = session.get(f'https://anond.hatelabo.jp/{user_name}/?page={i}')
    print(page.url)
    
    # 応答のHTMLをBeautifulSoupで解析
    soup = BeautifulSoup(page.content, 'html.parser')
    
    entries = soup.find_all('div', class_='section')
    for entry in entries:
        header = entry.find('h3')

        timestamp = header.find('a').get('href')[1:]
        item['url'] = 'https://anond.hatelabo.jp/'+timestamp
        item['title'] = header.get_text()[:-1]
        item['datetime'] = f"{timestamp[0:4]}/{timestamp[4:6]}/{timestamp[6:8]} {timestamp[8:10]}:{timestamp[10:12]}"

        footersection_text = entry.find_all('p')[-2].get_text()            
        item['characters'] = len(entry.find('p').get_text().strip(footersection_text))
        item['trackback'] = int(re.search(r'92;((.*?)92;)', footersection_text).group(1) if re.search(r'92;((.*?)92;)', footersection_text) else '')
        if item['title'] == '■':
            item['title'] = entry.find('p').get_text().strip(footersection_text)[:35]

        # 待機
        time.sleep(3)

        bookmark_page = session.get(f'https://b.hatena.ne.jp/entry/button/?url=https%3A%2F%2Fanond.hatelabo.jp%2F{timestamp}&layout=basic-label-counter&lang=ja')
        soup_b = BeautifulSoup(bookmark_page.content, 'html.parser')
        item['bookmark'] = int(soup_b.find('a', class_='count').get_text())

        # CSVファイル追記
        with open(output_file, 'a', newline='', encoding='utf-8') as file:
            writer = csv.DictWriter(file, fieldnames=item.keys())
            writer.writerow(item)

追記

わー。ごめんなさい。文字が何か所か変わっていました。

92; → \

& → アンドマーク(打てない←なんで~?)

次の25件>
ログイン ユーザー登録
ようこそ ゲスト さん