Filter
Exclude
Time range
-
Near
May 25
Replying to @mov_axbx
I like the parallels between this and how Emacs is (half) jokingly called a good OS with a mediocre editor For my agent stuff I want distributed access to machines, so Im repurposing a little C# service arch Pythonnet is suprisingly nice for the times I have to call Python
227
May 15
Replying to @LukeParkerDev
Im (VERY) slowly trying to build up a set of C# LLMish tools since we need more Right now its literally mostly a half finished OpenAI server shim, and calling out to python via PythonNet Is anyone putting together something where we can all yell at each other about style?
1
3
1,237
Replying to @claysul @Veiun_
This is from my Claude to your Claude based on the code. This should get you started. Here's a clean Claude-to-Claude build prompt: Build a Python/Tkinter desktop app called "NT8 Trading Control Hub" for Windows. Here's the full spec — avoid all pitfalls listed at the bottom. What it does: GUI control panel that manages a local Flask webhook server (receives TradingView alerts) and a Cloudflare tunnel (exposes it publicly), then forwards signals to NinjaTrader 8 via its ATM strategy system. Stack: Python, Tkinter ttk, subprocess, threading, requests, json 5-tab Notebook UI: Control tab — START/STOP buttons, 4 status indicators (Webhook Server, Tunnel, NT8 Connection, Web Access), scrolling activity log Tunnel Setup tab — Cloudflare login button, tunnel name entry, Create Tunnel button, UUID display (readonly), Generate Config.yml button Settings tab — NT8 account name, default ATM strategy name, flatten-before-entry checkbox, dynamic symbol mapping table (TradingView symbol → NT8 instrument, add/delete rows), Save button Testing tab — symbol input, BUY/SELL dropdown, Send Test Webhook button, response viewer Console tab — raw server stdout log Config stored in webhook_config.json next to the app. Defaults: { "webhook_secret": "your_secret_here", "nt8_account": "Sim101", "atm_strategy": "MyATMStrategy", "server_port": 5002, "flatten_before_entry": false, "domain": "yourdomain.com", "subdomain": "nt8", "tunnel_name": "nt8-webhook", "tunnel_uuid": "", "symbol_mappings": { "ES1!": "ES 09-26", "NQ1!": "NQ 09-26" } } Paths (Windows): App lives in ~/NT8WebhookBridge/ Server script: nt8_webhook_server.py in that folder, run via venv/Scripts/python.exe cloudflared: C:\cloudflared\cloudflared.exe, config at C:\cloudflared\config.yml Status polling every 5 seconds via root.after(). Web Access check hits https://{subdomain}.{domain}/status. Only log status changes or once per minute to avoid log spam. Track last_status_state tuple and last_log_time to throttle. Test webhook POSTs {"secret":..., "symbol":..., "action":..., "quantity":1} to http://localhost:5002/webhook Known pitfalls — avoid these: Do NOT use Python markdown link syntax anywhere (e.g. never write self.map_inner as [self.map](url)_inner) — this is a pure Python file, no markdown Tunnel and server processes use subprocess.Popen with stdout=PIPE, stderr=STDOUT, text=True — read server output on a daemon thread to avoid blocking Status labels use .config(text=..., foreground=...) — set both every cycle or stale color persists mapping_rows is a list of dicts {"tv": StringVar, "nt8": StringVar, "frame": Frame} — delete by filtering on frame identity, then call frame.destroy() save_all_settings rebuilds symbol_mappings from mapping_rows before calling save_config() Status bar at bottom: pack with side='bottom', fill='x' BEFORE the notebook or it gets hidden Yes, this is actually the more critical piece — it contains the NT8 ATI integration which is the hardest part to figure out. Here's an addendum to paste as the next reply in the thread: Part 2 — The Flask Webhook Server (nt8_webhook_server.py) This is the harder part. It uses pythonnet (clr) to load NT8's ATI DLL directly — no TCP socket hacks. Install: pip install flask flask-cors pythonnet DLL Integration: import clr, sys NT8_PATH = r"C:\Program Files\NinjaTrader 8\bin" sys.path.append(NT8_PATH) clr.AddReference("NinjaTrader.Client") from NinjaTrader.Client import Client client = Client() Place order command signature (exact arg order matters): client.Command("PLACE", account, symbol, action, qty, "MARKET", 0, 0, "DAY", "", "", atm_strategy, "") Flatten before entry: client.Command("CLOSE", account, symbol, "BUY", 0, "MARKET", 0, 0, "DAY", "", "FLATTEN", "", "") time.sleep(0.3) # NT8 needs a moment Return code 0 = rejection (bad symbol or NT8 not ready). Any nonzero = accepted. Two routes: POST /webhook — validates secret, maps TV symbol → NT8 instrument via config, calls place_order() GET /status — returns {"nt8_connected": bool, "account": "..."} (used by the GUI health check) Webhook payload expected: {"secret": "...", "symbol": "ES1!", "action": "BUY", "quantity": 1} atm_strategy is optional in payload — falls back to config default. Known pitfalls: pythonnet version matters — use pythonnet==3.0.3, not 2.x (different clr import behavior) NT8 must be running AND the ATI connection enabled under Tools → Options → Automated Trading Interface → "AT Interface" Symbol must exactly match NT8's instrument name including expiry (e.g. ES 09-26) — mismatch returns code 0 silently Reload config on every request (one config.load() call) so GUI settings changes apply without restart Run Flask on 0.0.0.0 not 127.0.0.1 — Cloudflare tunnel needs it bound to all interfaces flask-cors required or browser-based senders get blocked Together the two replies give someone everything needed to build this cold. Your questions are always welcome!

79
お、pythonnetいいな🤔
355
[.]NETアセンブリをPythonから操作するライブラリ「pythonnet」とMCPサーバーを組み合わせ、[.]NETマルウェア解析の反復作業をAIアシスタントに肩代わりさせた事例。APT28がC2フレームワーク「Covenant」の拡張機能で、クラウドストレージKoofr/Filen経由のC2通信を実装した検体が確認され、その解析を題材に、[.]NET中間言語のオペコード列から暗号化文字列の復号ルーチンを特定し、鍵抽出とldstrオペランド書き換えまでPython側で自動化した上で、AIアシスタントと連携して解析を進めるアプローチが紹介されています。 同アプローチはMCPサーバーとして実装され、解析ツール群をAI側から自律的に呼び出せる構成でオープンソース提供(GitHub)されています。 【要点の整理】 ・出典:Sekoia TDRチームが2026年4月16日付で公開した技術ブログ。APT28運用のCovenant検体を題材に、[.]NET解析の自動化手法とMCPサーバー構成を記載。 ・検体の概要:APT28(ロシアGRU第85特別任務センター帰属と評価)が運用するCovenant検体。C2Bridge拡張点を用いてクラウドストレージKoofr/Filenへのファイル送受信だけでC2通信を完結させる独自実装との指摘。プライマリアクセス喪失時の再感染用としてC 製フォールバックBeardShell、キーロギングと情報窃取に特化したSlimAgentへの言及あり。 ・従来解析の摩擦点:暗号化文字列の個別復号や関数名の逐次リネームが反復的で、[.]NETデコンパイラdnSpyもコード書き換えには向かないため解析を遅らせていたとの説明。 ・自動化の中核:pythonnetで[.]NETアセンブリを操作し、ILオペコード列の署名パターンで復号関数を特定。ldsfld命令から鍵名、静的コンストラクタ([.]cctor)で鍵値を取得し、ldstrオペランドを復号値に置換、復号関数呼び出しをnop化するパッチまで自動化する構成。 ・公開ツール「RePythonNET-MCP」:セッション管理・メタデータ抽出・ナビゲーション・解析・IL検査・デコンパイル・パッチの7カテゴリ計38ツールがGitHubで公開。「pythonnetで該当ファイルを解析。推測はせず、C2が見つかったら送って」の3文プロンプトでAI側が検体ロード〜C2特定を自律実行する事例をスクリーンショットで提示。 同チームはAI連携解析を、万能策ではなく反復作業の一部を肩代わりする実用的な手段と位置付け。[.]NETリバースエンジニアリングのエコシステムは依然として薄いとの観察のもと、解析者の反復作業の一部を軽減するOSSが共有された形。 詳細はリンク先の記事を参照。 blog.sekoia.io/apt28-to-repy…
1
10
1,401
pythonnet has done a tremendous job for years — still the best for bidirectional interop. But I needed something lighter: Native AOT, .NET 10 file-based apps, declarative uv integration. So I built DotNetPy. dev.to/rkttu/introducing-dot… #dotnet #python #csharp #opensource
46
Голосование #318.  v2.0.0 Обновление @akashnet 23.03 ~17:00 Мск блок 26063777 1.Создание модуля BME (AEP-76 ) 2. Управляемые системой смарт-контракты (CosmWasm),AEP-78 3.Модуль Price Oracle (AEP-80) 4.Трансляция цены AKT/USD через смарт-контракты с помощью PythonNet (AEP-81)
The wait is over. The Burn-Mint Equilibrium (BME) proposal is going onchain for a vote today, with an upgrade scheduled for March 23rd at 14:00 UTC. BME restores direct utility to $AKT, anchoring token value to real network usage, where every $AKT used for deploying will be burnt. This upgrade also introduces WASM smart contracts to Akash - a foundational step that enables the Core Team to iterate and build faster without full chain coordination. Cast your vote & track the proposal live on Mintscan ↓ mintscan.io/akash/proposals/…
23
A Docker-packaged Jupyter Notebook workflow uses pythonnet and dnlib to statically extract and decrypt QuasarRAT’s configuration from .NET assemblies, including obfuscated builds. #QuasarRAT #StaticAnalysis #France ift.tt/yhBzKSm

101
The latest article in the "Advent of Configuration Extraction" series reveals how to extract QuasarRAT's encrypted configuration using Jupyter Notebook and pythonnet, ensuring all steps are reproducible. #QuasarRAT #MalwareAnalysis blog.sekoia.io/advent-of-con…
2
10
1,387
Pythonというかopencvの謎挙動に苦しめられ、pythonnetを介したC#との連携に苦しめられ🥹
4
589
Pypreviewについて多角的に調べたら、標準インストールだと.Netframework依存(たいてい導入済)のpythonnetが必要だが、webviewで構築する場合は要らなくて除外インストールもあるらしい。 で、electronと比べた場合、肝心のインストーラーはないが、pyinstallerを使えばexeは作れるのが定番とか。
34
3 Nov 2025
Sylph で技術的にがんばったのは、C# のメインアプリケーションから pythonnet で sb3 の PPO を叩いて学習してるところとか、CBS による MAPF の自前実装とか、Marvelous Designer から書き出したアニメの mdd を変換して zig で書いたネイティブプラグイン経由で Unity に流し込んでるとことか!
1
3
456
一边干活一边摸鱼 直接用pythonnet还是太抓虾了 我决定先写些py代码,调通了再移植到pynet 那么看来我需要个vscode来写py? 看起来vs2022也能写py的样子?
15
14 Sep 2025
github.com/Inwerwm/MikuMikuM… こちらをお借りしてpythonnetで.NET8指定でもって来れました。.NET Framework以外では依存関係などは特に問題なし。順調かも
1
392
Replying to @i_am_arash
ارتباطی ندارند جز pythonnet :)) بیشتر فان بود
72
24 Jul 2025
pythonnet であれやこれやしてたらさすがにやりすぎて怒られた
1
4
669
んで、その結果の解決策が参照渡しされた引数をセットで返すというPythonnetの実装になったのだと推測。
1
1
28
Pythonの言語仕様では引数の「参照渡し」は存在せず、すべて「値渡し」のため、.NETライブラリの記述言語とは無関係、かつ参照先が書き換えられたかどうかに関係なく、「参照渡し」された引数は、戻り値の一部として返されると言う、おそらく「Pythonnet」限定の仕様だと思われます。
2
1
3
156