並び順

ブックマーク数

期間指定

  • から
  • まで

1 - 5 件 / 5件

新着順 人気順

if elif else statement in python definitionの検索結果1 - 5 件 / 5件

  • ソースコード & ドキュメントに対応したGraph RAGの実装(Tree-sitter + LightRAG)

    (module (function_definition (identifier) # ← ここに関数名「sample_func」が含まれます (parameters) (block (expression_statement (call (identifier) (argument_list (string)))))) (expression_statement (call (identifier) (argument_list)))) ノードが色々取れましたが、「function_definition」が関数、その子である「identifier」が関数名を表すため、 function_definition == 子ノード ==> identifier となっている箇所を探索すれば抽出できます(関数ではあっても「lambda」など異なる場合もあります)。 今回は上記のようにTree-si

      ソースコード & ドキュメントに対応したGraph RAGの実装(Tree-sitter + LightRAG)
    • Building a Toy Programming Language in Python

      I thought it would be fun to go outside of my comfort zone of web development topics and write about something completely different and new, something I have never written about before. So today, I'm going to show you how to implement a programming language! The project will parse and execute programs written in a simple language I called my (I know it's a lame name, but hey, it is "my" language).

        Building a Toy Programming Language in Python
      • Rust on MIPS64 Windows NT 4.0

        Introduction Some part of me has always been fascinated with coercing code to run in weird places. I scratch this itch a lot with my security research projects. These often lead me to writing shellcode to run in kernels or embedded hardware, sometimes with the only way being through an existing bug. For those not familiar, shellcode is honestly hard to describe. I don’t know if there’s a very form

          Rust on MIPS64 Windows NT 4.0
        • Python behind the scenes #11: how the Python import system works

          If you ask me to name the most misunderstood aspect of Python, I will answer without a second thought: the Python import system. Just remember how many times you used relative imports and got something like ImportError: attempted relative import with no known parent package; or tried to figure out how to structure a project so that all the imports work correctly; or hacked sys.path when you couldn

          • Python behind the scenes #12: how async/await works in Python

            Mark functions as async. Call them with await. All of a sudden, your program becomes asynchronous – it can do useful things while it waits for other things, such as I/O operations, to complete. Code written in the async/await style looks like regular synchronous code but works very differently. To understand how it works, one should be familiar with many non-trivial concepts including concurrency,

            1