並び順

ブックマーク数

期間指定

  • から
  • まで

1 - 21 件 / 21件

新着順 人気順

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

  • PDFを高品質なマークダウンに変換する方法|すぅ | AI駆動PM

    PDFファイルをマークダウンに変換する作業って、地味だけど本当に大切な作業ですよね。 「また手作業でコピペか...」 「レイアウトが崩れてる...」 「表がめちゃくちゃになってる...」 私もさまざまな文書管理の現場で同じような課題に直面してきました。特に、既存のPDF資料をObisidianやNotionなどのマークダウン形式で管理したい場面って、本当に多いですよね。 手作業でやると、一つの文書だけで数時間かかることもあります。表や画像の配置を調整して、リンクを張り直して、フォーマットを整えて...。骨が折れる作業です。 「もっと効率的な方法はないだろうか?」 そう思っていた矢先、いくつかの優秀な手法を発見しました。今回は、スキルレベル別に4つのアプローチをご紹介したいと思います。 【各レベルの概要】まず、それぞれのアプローチの特徴を簡単にご紹介しておきますね。 レベル1:GPT-5でシ

      PDFを高品質なマークダウンに変換する方法|すぅ | AI駆動PM
    • 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) - かねこにっき
        • Structural pattern matching in Python 3.10

          September 2021 Summary: Python 3.10, which is due out in early October 2021, will include a large new language feature called structural pattern matching. This article is a critical but (hopefully) informative presentation of the feature, with examples based on real-world code. Go to: What it is | Where it shines | My code | Other projects | Problems | Wrapping up At a recent local Python meetup,

          • 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
                  • Phylum Discovers Dozens More PyPI Packages Attempting to Deliver W4SP Stealer in Ongoing Supply-Chain Attack

                    Phylum Discovers Dozens More PyPI Packages Attempting to Deliver W4SP Stealer in Ongoing Supply-Chain Attack Last week, our automated risk detection platform alerted us to some suspicious activity in dozens of newly published PyPI packages. It appears that these packages are a more sophisticated attempt to deliver the W4SP Stealer on to Python developer’s machines by hiding a malicious __import__

                      Phylum Discovers Dozens More PyPI Packages Attempting to Deliver W4SP Stealer in Ongoing Supply-Chain Attack
                    • ​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
                      • 【GROMACS】GROMACSを用いたタンパク質-低分子リガンドのMD simulation【in silico創薬】【前編】 - LabCode

                        MD シミュレーションとは?MDシミュレーションは、分子の動きや相互作用を計算機上で再現する手法です。分子の構造と相互作用を記述する力場(potential function)を使用し、時間の経過とともに分子の運動を予測します。これにより、物質の性質や相互作用の理解、材料設計、生体分子の研究などに応用されます。 GROMACSは、MDシミュレーションを実行するためのソフトウェアの一つです。GROMACSは高性能な計算を行うための最適化が施されており、広く使われている信頼性の高いツールです。GROMACSを使うことで、分子のダイナミクスや相互作用をシミュレーションすることができます。 この記事では実際にGROMACSを使って、自分のパソコンでタンパク質(T4リゾチームL99A/M102Q)とリガンド(2-プロピルフェノール)の複合体のMDシミュレーションをを行なっていきます。 GROMACS

                        • BigQueryを補完する技術: DuckDBとDataflowでのデータ処理入門 - yasuhisa's blog

                          背景 & Disclaimer DuckDB 概念や代表的なユースケース 使ってみる 1週間〜一ヶ月などある程度の期間、分析で使いたい場合 便利なCLIツールとして使う 所感 参考 Dataflow 代表的なユースケース 具体例 参考 背景 & Disclaimer BigQueryは非常に便利で、BigQueryにさえ上がってしまえばSQLで巨大なデータを簡単に相手にできます とはいえ、BigQueryに行きつくまでが大変な場合もありえます 例: 個人情報を含むsensitiveなデータで、BigQueryに気軽に上げられないケース 一時的であっても、相談なしにその手のデータを気軽にアップロードするのはやめてください... 数万件程度であれば手元のエクセルで開いて、問題ない行/列だけに絞る、ということもできるが、もっと量が多いデータだとそういうわけにもいかない。そもそも分析はSQLでやり

                            BigQueryを補完する技術: DuckDBとDataflowでのデータ処理入門 - yasuhisa's blog
                          • オレオレ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