並び順

ブックマーク数

期間指定

  • から
  • まで

1 - 16 件 / 16件

新着順 人気順

syntax for if elif else in pythonの検索結果1 - 16 件 / 16件

  • Writing a C compiler in 500 lines of Python

    A few months ago, I set myself the challenge of writing a C compiler in 500 lines of Python1, after writing my SDF donut post. How hard could it be? The answer was, pretty hard, even when dropping quite a few features. But it was also pretty interesting, and the result is surprisingly functional and not too hard to understand! There's too much code for me to comprehensively cover in a single blog

    • Ruby Parser開発日誌 (1) - かねこにっき

      Error Tolerant parserに関するアイデア 9月半ばに行われたRubyKaigi 2022以来、3ヶ月くらいError Tolerant parserについて調べたり考えたり実装をしたりしています。 途中でもいいからなにかにアウトプットしておくとよいというアドバイスをもらったので、今現在の状況や考えていることを書いておこうと思います。 Error Tolerant parserとは? どうしてそれが欲しいの? 通常parserはユーザーの入力を受け取り その入力がそのプログラミング言語にとって、validなものか否かをチェック validな場合、その後の工程にとって都合のいいデータ構造(例えばAST)に変換し、後工程に渡す invalidな場合、Syntax Errorをレポートする といった処理を行います。 しかしIDEやLSP(Language Server Proto

        Ruby Parser開発日誌 (1) - かねこにっき
      • Implementing Logic Programming

        Most of my readers are probably familiar with procedural programming, object-oriented programming (OOP), and functional programming (FP). The majority of top programming languages on all of the language popularity charts (like TIOBE) support all three to some extent. Even if a programmer avoided one or more of those three paradigms like the plague, they’re likely at least aware of them and what th

          Implementing Logic Programming
        • 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
          • 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

            • Python 3.10の新機能:構造化パターンマッチング | gihyo.jp

              鈴木たかのりです。今月からgihyo.jp上で「Python Monthly Topics」と題して、毎月Python関連の話題になったトピックやツール、ライブラリなどを紹介していきたいと思います。 第1回目はPython 3.10の新機能「構造化パターンマッチング(Structural Pattern Matching⁠)⁠」について紹介します。 Python 3.10の新機能 Python 3.10は2021年10月4日にリリースされました。現在のPythonの最新バージョンは3.10.5で、Download Pythonのページからダウンロードできます。 Python 3.10.5のリリースページを見ると、謎のヘビの画像があります。 Python 3.10 release logo この画像はPython 3.10 release logoという画像で、ヘビの周りにPython 3.

                Python 3.10の新機能:構造化パターンマッチング | gihyo.jp
              • ​Getting Started with Python

                Python is a powerful programming language that provides many packages that we can use. Using the versatile Python programming language, we can develop the following: AutomationDesktop applicationAndroidWebIoT home automationData Science and the list goes on.In this article, our primary focus will be knowing how to start learning Python and the essentials required to be a data scientist. Below is t

                  ​Getting Started with Python
                • オレオレFuzzerもどきを利用してCTFのpwnableを解こう - CTFするぞ

                  はじめに Fuzzingの概念 なぜ自分でFuzzerを書くのか 実際に問題を解く dual - ユーザーランドプログラムのFuzzing Step 1. Fuzzerの方針を立てる Step 2. テストケースを最適化する Step 3. 問題を解く spark - カーネルドライバのFuzzing Step 1. Fuzzerの方針を立てる Step 2. 再現性のあるテストケースを見つける Step 3. 問題を解く atoms - カーネルドライバのFuzzing(マルチスレッド) Step 1. Fuzzerの方針を立てる Step 2. 問題を解く cgi - CGIのFuzzing Step 1. Fuzzerの方針を立てる Step 2. 解きたい telescope - Fuzzingの結果から攻略法を考え直す Step 1. Fuzzerの方針を立てる Step 2.

                    オレオレFuzzerもどきを利用してCTFのpwnableを解こう - CTFするぞ
                  • 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
                    • [Ansible] そのtag設定、想定通りに動いてますか? (継承機能とその実装を確認する) - zaki work log

                      playbook内のtask定義にtagを設定しておくことで、指定tagのtaskのみ実行したり、逆に指定tagのtaskを除外してansible-playbookを実行することができます。 開発中のtaskのみピンポイントで実行したい場合や、逆に、共有のDBのデータを更新したりするtaskはほかのユーザーやチームと調整してからでないと実行が難しかったり、Blue-Greenデプロイメントの実装で環境Aの機能をオフにしてもう片方の環境Bをオンにするような処理だけど開発中は環境Bだけ確認したかったり、大量データのダウンロードや冪等の確認を伴い処理に時間がかかるため開発中は実行したくないなど特定のtaskは実行したくない場合に利用できます。 また、特殊tagとして、常に実行するalwaysと実行しないneverというtagが予約語として用意されています。 neverは特に「通常は実行したくない

                        [Ansible] そのtag設定、想定通りに動いてますか? (継承機能とその実装を確認する) - zaki work log
                      • 12 Languages in 12 Months

                        I stumbled across Exercism last year and was immediately charmed. It's a website devoted to teaching programming languages. It's got a great UI, offers free mentoring (by a human!), and is entirely open source. Last January, they announced a new program called 12in23, where they challenged participants to try 12 new programming languages in 2023. Each month would have a theme (such as "Analytical

                          12 Languages in 12 Months
                        • Introducing Amazon Kinesis Data Analytics Studio – Quickly Interact with Streaming Data Using SQL, Python, or Scala | Amazon Web Services

                          AWS News Blog Introducing Amazon Kinesis Data Analytics Studio – Quickly Interact with Streaming Data Using SQL, Python, or Scala The best way to get timely insights and react quickly to new information you receive from your business and your applications is to analyze streaming data. This is data that must usually be processed sequentially and incrementally on a record-by-record basis or over sli

                            Introducing Amazon Kinesis Data Analytics Studio – Quickly Interact with Streaming Data Using SQL, Python, or Scala | Amazon Web Services
                          • JSON is not JSON Across Languages | Dochia CLI Blog

                            Introduction: These Aren’t the JSONs You’re Looking For JSON (JavaScript Object Notation) was designed as a simple, lightweight, and human-readable data interchange format, often positioned as a more accessible alternative to XML. It has become the de facto standard for web APIs and system integration. However, while the specification itself is straightforward, different programming languages and

                              JSON is not JSON Across Languages | Dochia CLI Blog
                            • Exhaustive Union Matching in Python - Preferred Networks Research & Development

                              Pattern matching on algebraic data types is a powerful technique to process a given input and many programming languages have adopted it in one way or another. A check on whether a given match is “exhaustive”, i.e., covers all possible inputs, is helpful to avoid bugs when the set of possible inputs is extended; for example, when new enumeration values are added. In this blog post I will first bri

                                Exhaustive Union Matching in Python - Preferred Networks Research & Development
                              • 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,

                                • Why F#?

                                  Hacker. Emacs fanatic. Lover of parentheses. Firebrand. Just another programmer with too many opinions. I’m not the best, but I’m pretty good. If someone had told me a few months ago I’d be playing with .NET again after a 15+ years hiatus I probably would have laughed at this.1 Early on in my career I played with .NET and Java, and even though .NET had done some things better than Java (as it had

                                    Why F#?
                                  1