並び順

ブックマーク数

期間指定

  • から
  • まで

1 - 12 件 / 12件

新着順 人気順

python sys stdin buffer readの検索結果1 - 12 件 / 12件

  • シェルスクリプトとの対比で理解するPythonのsubprocess - 朝日ネット 技術者ブログ

    はじめに 開発部の ikasat です。 皆さんは git, ssh, rsync のような外部コマンドを呼び出すスクリプトを書きたくなったことはありますか? 個人的にこの類のスクリプトは最初はシェルスクリプトとして書くのですが、改修を重ねるうちに肥大化して処理も複雑になり、 後から Python のような汎用プログラミング言語で書き直すことがよくあります。 外部コマンド呼び出しを書き直す際に、Git 操作のために pygit2、 SSH 接続のために paramiko のようなライブラリをわざわざ使うのは大がかりだったり、 rsync に相当するようなこなれたライブラリが存在しなかったりする場合があります。 そのような時は標準ライブラリの subprocess モジュールを利用し、Python から外部コマンドを呼び出すことになるでしょう。 しかしながら、Python のチュートリアルペ

      シェルスクリプトとの対比で理解するPythonのsubprocess - 朝日ネット 技術者ブログ
    • Building a tiny Linux from scratch

      Last week, I built a tiny Linux system from scratch, and booted it on my laptop! Here’s what it looked like: Let me tell you how I got there. I wanted to learn more about how the Linux kernel works, and what’s involved in booting it. So I set myself the goal to cobble together the bare neccessities required to boot into a working shell. In the end, I had a tiny Linux system with a size of 2.5 MB,

        Building a tiny Linux from scratch
      • Performance comparison: counting words in Python, Go, C++, C, AWK, Forth, and Rust

        Performance comparison: counting words in Python, Go, C++, C, AWK, Forth, and Rust March 2021 Summary: I describe a simple interview problem (counting frequencies of unique words), solve it in various languages, and compare performance across them. For each language, I’ve included a simple, idiomatic solution as well as a more optimized approach via profiling. Go to: Constraints | Python Go C++ C

        • Sublime Text 4

          The first stable release of Sublime Text 4 has finally arrived! We've worked hard on providing improvements without losing focus on what makes Sublime Text great. There are some new major features that we hope will significantly improve your workflow and a countless number of minor improvements across the board. A huge thanks goes out to all the beta testers on discord and all the contributors to

            Sublime Text 4
          • 缶つぶし機とソフトウェア移行技術 - Refactoring to Rust の読書感想文 - じゃあ、おうちで学べる

            はじめに ——あるいは、「知っている」と「理解している」の間 Rustのことは、知っていた。学習もしていた。実務でも使っていた。 でも、それは知っているつもりだった。 知ってるつもり 無知の科学 (ハヤカワ文庫NF) 作者:スティーブン スローマン,フィリップ ファーンバック早川書房Amazon 日々Rustで開発し、BoxとRcとArcを使い分け、tokio::spawnでタスクを生成し、?演算子を当たり前のように書いている。FFI?PyO3使えばいいでしょ。WebAssembly?wasm-bindgenがあるじゃない。技術的には、確かに「使える」レベルにはあった。 でも、心のどこかで感じていた違和感があった。 オートバイのエンジンを分解できる人と、エンジンが動く原理を理解している人は違う。コードが動くことと、なぜそう書くべきかを理解することも違う。私は前者だった。メカニックではあった

              缶つぶし機とソフトウェア移行技術 - Refactoring to Rust の読書感想文 - じゃあ、おうちで学べる
            • python_modules.pdf

              Python3 OpenCV / Pillow / pygame / Eel / PyDub / NumPy / matplotlib / SciPy / SymPy / gmpy2 / hashlib, passlib / Cython / Numba / ctypes / PyInstaller / curses / tqdm / JupyterLab / json / psutil / urllib / zenhan / jaconv Copyright © 2017-2025, Katsunori Nakamura 2025 8 19 Python ‘ .py’ Python Python Windows PSF Python py .py Enter macOS Linux PSF Python python3 .py Enter Anaconda Prompt Python p

              • 0.10.0 Release Notes ⚡ The Zig Programming Language

                Tier 4 Support § Support for these targets is entirely experimental. If this target is provided by LLVM, LLVM may have the target as an experimental target, which means that you need to use Zig-provided binaries for the target to be available, or build LLVM from source with special configure flags. zig targets will display the target if it is available. This target may be considered deprecated by

                • Vim9 script for Python Developers · GitHub

                  vim9script4pythondevelopers.md Vim9 script for Python Developers Vim9 script�Vim script��������������������������������������������������系��� def������義����������Vim script��vim9script�����使����������(vim9script���

                    Vim9 script for Python Developers · GitHub
                  • Python の open 関数と io モジュールをきちんと使うために - 朝日ネット 技術者ブログ

                    はじめに 開発部の ikasat です。 Python の言語・ライブラリ・処理系はプログラマのタスクを手早く簡単にこなせるようにするために設計されており、数行程度のコードを書いただけでも内部で様々なことをやってくれます。 しかし、この便利さが特定のユースケースにおいては逆にお節介になってしまうこともあり、また内部動作が複雑であることにより挙動を修正する方法も分からなくなりがちです。 特に組み込みの open 関数や標準入出力 (sys.stdin, sys.stdout) はその最たる例であり、UnicodeEncodeError / UnicodeDecodeError や TypeError: a bytes-like object is required は Python を使った人であれば誰もが見たことのあるエラーメッセージでしょう。 私自身これまでこの類のエラーが出た時には検索

                      Python の open 関数と io モジュールをきちんと使うために - 朝日ネット 技術者ブログ
                    • Plan 9 Desktop Guide

                      PLAN 9 DESKTOP GUIDE INDEX What is Plan 9? Limitations and Workarounds Connecting to Other Systems VNC RDP SSH 9P Other methods Porting Applications Emulating other Operating Systems Virtualizing other Operating Systems Basics Window Management Copy Pasting Essential Programs Manipulating Text in the Terminal Acme - The Do It All Application Multiple Workspaces Tiling Windows Plumbing System Admin

                      • Large Text Compression Benchmark

                         Large Text Compression Benchmark Matt Mahoney Last update: July 3, 2025. history This competition ranks lossless data compression programs by the compressed size (including the size of the decompression program) of the first 109 bytes of the XML text dump of the English version of Wikipedia on Mar. 3, 2006. About the test data. The goal of this benchmark is not to find the best overall compressi

                        • Flipping Pages: An analysis of a new Linux vulnerability in nf_tables and hardened exploitation techniques

                          This blogpost is the next instalment of my series of hands-on no-boilerplate vulnerability research blogposts, intended for time-travellers in the future who want to do Linux kernel vulnerability research. Specifically, I hope beginners will learn from my VR workflow and the seasoned researchers will learn from my techniques. In this blogpost, I'm discussing a bug I found in nf_tables in the Linux

                          1