並び順

ブックマーク数

期間指定

  • から
  • まで

1 - 40 件 / 52件

新着順 人気順

python default value if not in dictionaryの検索結果1 - 40 件 / 52件

  • 関数名、メソッド名、変数名でよく使う英単語のまとめ

    プログラミングをしていると関数名、メソッド名、変数名をどうするか悩みます。 ロジックより命名に時間を費やすこともざらにあります。翻訳したり、一般的な命名規則なのかいつも検索して大変です。 よく使うサイトの内容をコピってメモしておく 関数名とメソッド名の違いについて よく使う英単語のまえに、いつもごっちゃにして使っているけど、定義はこんな感じ 「関数」と「メソッド」の違い 似ているところ どちらも何か(引数)を入れると処理をして何か(戻り値)を返してくれます。 違うところ やってること自体は大差ありません。概念としては違います。 メソッドはオブジェクト指向で登場する用語で、オブジェクトの動作を定義したものです。 まずオブジェクトありきなのですね。一方の関数は、オブジェクト云々は関係ありません。 個人的な使い分け Java で登場する関数は「メソッド」です。C 言語で登場する関数は「関数」と呼

      関数名、メソッド名、変数名でよく使う英単語のまとめ
    • The Prompt Engineering Playbook for Programmers

      Developers are increasingly relying on AI coding assistants to accelerate our daily workflows. These tools can autocomplete functions, suggest bug fixes, and even generate entire modules or MVPs. Yet, as many of us have learned, the quality of the AI’s output depends largely on the quality of the prompt you provide. In other words, prompt engineering has become an essential skill. A poorly phrased

        The Prompt Engineering Playbook for Programmers
      • OOP: the worst thing that happened to programming

        > BTC: bc1qs0sq7agz5j30qnqz9m60xj4tt8th6aazgw7kxr ETH: 0x1D834755b5e889703930AC9b784CB625B3cd833E USDT(Tron): TPrCq8LxGykQ4as3o1oB8V7x1w2YPU2o5n Ton: UQAtBuFWI3H_LpHfEToil4iYemtfmyzlaJpahM3tFSoxomYQ Doge: D7GMQdKhKC9ymbT9PtcetSFTQjyPRRfkwTdismiss OOP: the worst thing that happened to programming [2/24/2025] In this article, we will try to understand why OOP is the worst thing that happened to prog

          OOP: the worst thing that happened to programming
        • yt-dlp オプション一覧及びそのメモ - †MASAYOSHI†のオンラインメモ帳

          youtube-dlの開発が止まっておりfork版のyt-dlpに移る事にした。yt-dlpはyoutube-dlのforkであるyoutube-dlcのそのまたforkになる。オリジナルであるyoutube-dlのオプション解説はyoutube-dl オプション一覧及びそのメモ。 2022/06/19更新 2022/09/06更新 OPTIONS -h, --helpヘルプを表示する。 --versionプログラムのVerを表示する。 -U, --update --no-update (default)プログラムのupdateを実行するかどうか。 -i, --ignore-errorsダウンロードエラーを無視する。プレイリストごとダウンロードするような時に使う。エラーで失敗してもダウンロードは成功したとみなされる。 --no-abort-on-error (default) --abor

            yt-dlp オプション一覧及びそのメモ - †MASAYOSHI†のオンラインメモ帳
          • GitHub - opendatalab/MinerU: A high-quality tool for convert PDF to Markdown and JSON.一站式开源高质量数据提取工具,将PDF转换成Markdown和JSON格式。

            2025/08/01 2.1.10 Released Fixed an issue in the pipeline backend where block overlap caused the parsing results to deviate from expectations #3232 2025/07/30 2.1.9 Released transformers 4.54.1 version adaptation 2025/07/28 2.1.8 Released sglang 0.4.9.post5 version adaptation 2025/07/27 2.1.7 Released transformers 4.54.0 version adaptation 2025/07/26 2.1.6 Released Fixed table parsing issues in ha

              GitHub - opendatalab/MinerU: A high-quality tool for convert PDF to Markdown and JSON.一站式开源高质量数据提取工具,将PDF转换成Markdown和JSON格式。
            • Things we learned about LLMs in 2024

              31st December 2024 A lot has happened in the world of Large Language Models over the course of 2024. Here’s a review of things we figured out about the field in the past twelve months, plus my attempt at identifying key themes and pivotal moments. This is a sequel to my review of 2023. In this article: The GPT-4 barrier was comprehensively broken Some of those GPT-4 models run on my laptop LLM pri

                Things we learned about LLMs in 2024
              • How to create a Python package in 2022

                Photo by Claudio Schwarz on Unsplash. How to create a Python package? In order to create a Python package, you need to write the code that implements the functionality you want to put in your package, and then you need to publish it to PyPI. That is the bare minimum. Nowadays, you can also set up a variety of other things to make your life easier down the road: continuous testing of your package;

                  How to create a Python package in 2022
                • Announcing TypeScript 5.2 RC - TypeScript

                  Today we’re excited to announce our Release Candidate of TypeScript 5.2! Between now and the stable release of TypeScript 5.2, we expect no further changes apart from critical bug fixes. To get started using the RC, you can get it through NuGet, or through npm with the following command: npm install -D typescript@rc Here’s a quick list of what’s new in TypeScript 5.2! using Declarations and Explic

                    Announcing TypeScript 5.2 RC - TypeScript
                  • Why I use attrs instead of pydantic

                    This post is an account of why I prefer using the attrs library over Pydantic. I'm writing it since I am often asked this question and I want to have something concrete to link to. This is not meant to be an objective comparison of attrs and Pydantic; I'm not interested in comparing bullet points of features, nor can I be unbiased since I'm a major contributor to attrs (at time of writing, second

                    • Rust: A Critical Retrospective « bunnie's blog

                      Since I was unable to travel for a couple of years during the pandemic, I decided to take my new-found time and really lean into Rust. After writing over 100k lines of Rust code, I think I am starting to get a feel for the language and like every cranky engineer I have developed opinions and because this is the Internet I’m going to share them. The reason I learned Rust was to flesh out parts of t

                      • What's new in Python 3.11?

                        What's new in Python 3.11?Built-in TOML support, better exceptions, and typing improvements. By Tushar·InsightsPython The first beta release of Python 3.11 is out, bringing some fascinating features for us to tinker with. This is what you can expect to see in 2022's release of Python later this year. Even better error messagesPython 3.10 gave us better error messages in various regards, but Python

                          What's new in Python 3.11?
                        • A Lisp Interpreter Implemented in Conway’s Game of Life

                          Lisp in Life is a Lisp interpreter implemented in Conway’s Game of Life. The entire pattern is viewable on the browser here. To the best of my knowledge, this is the first time a high-level programming language was interpreted in Conway’s Game of Life. Running Lisp on the Game of Life Lisp is a language with a simple and elegant design, having an extensive ability to express sophisticated ideas as

                            A Lisp Interpreter Implemented in Conway’s Game of Life
                          • TypedDicts are better than you think

                            TypedDict was introduced in PEP-589 which landed in Python 3.8. The primary use case was to create type annotations for dictionaries. For example, class Movie(TypedDict): title: str movie: Movie = {"title": "Avatar"} I remember thinking at the time that this was pretty neat, but I tend to use dataclass or pydantic to represent 'record' type data. Instead I use dictionaries more as a collection, so

                            • ​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
                              • 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

                                • ChatGPT x LangChain で独自ドキュメントのベクターストア検索をチューニングする - GMOインターネットグループ グループ研究開発本部

                                  D.Mです。 ChatGPT を開発の現場で活かしていくためにベクターストア活用の方法を検証しました。 結論ファースト A. ベクターストアに入れる元ネタドキュメントの抽出 ⇒ unstructured が使えるかも B. ベクターストアに入れる元ネタドキュメントのチャンク分け ⇒ タイトル。キーワードをメタデータで付加 C. ベクターストアに投げる質問プロンプトの最適化 ⇒ 形態素またはキーワード抽出でプロンプトを精査 D. ベクターストア検索結果の精査 ⇒ ContextualCompressionRetriever による検索結果要約とDocumentCompressorPipeline による検索結果絞り込みがよさげ 「検索結果が質問に沿ったものか精査させる」タスクをChatGPTに担当してもらうことが私の業務課題には適しているのではという気付きがありました。 E. (おまけ)ベク

                                    ChatGPT x LangChain で独自ドキュメントのベクターストア検索をチューニングする - GMOインターネットグループ グループ研究開発本部
                                  • Announcing TypeScript 5.2 Beta - TypeScript

                                    Today we are excited to announce the availability of TypeScript 5.2 Beta. To get started using the beta, you can get it through NuGet, or through npm with the following command: npm install -D typescript@beta Here’s a quick list of what’s new in TypeScript 5.2! using Declarations and Explicit Resource Management Decorator Metadata Named and Anonymous Tuple Elements Easier Method Usage for Unions o

                                      Announcing TypeScript 5.2 Beta - TypeScript
                                    • Frozen String Literals: Past, Present, Future?

                                      If you are a Rubyist, you’ve likely been writing # frozen_string_literal: true at the top of most of your Ruby source code files, or at the very least, that you’ve seen it in some other projects. Based on informal discussions at conferences and online, it seems that what this magic comment really is about is not always well understood, so I figured it would be worth talking about why it’s there, w

                                      • Writing Pythonic Rust

                                        Over the past several weeks I have been attempting to reimplement the API of an existing python library as a wrapper for an equivalent library in Rust. tl;dr: this ended up being much harder than I expected it to be, partly because of important differences in the behaviour of the two languages, and partly because of the (self-imposed) obligation to match an existing (idiomatic) python API. Motivat

                                        • Announcing DuckDB 1.3.0

                                          To install the new version, please visit the installation guide. Note that it can take a few hours to days to release some client libraries (e.g., Go, R, Java) and extensions (e.g., the UI) due to the extra changes and review rounds required. We are proud to release DuckDB 1.3.0. This release of DuckDB is named “Ossivalis” after Bucephala Ossivalis, an ancestor of the Goldeneye duck that lived mil

                                            Announcing DuckDB 1.3.0
                                          • How it became like this? Ruby Range class

                                            Understanding the core class design and usage via its evolution Years ago, my studies into the Ruby Evolution started with the persuasion that mastering the programming language to express one’s intentions clearly and efficiently may grow significantly by understanding how it evolved and what intentions were put behind its various elements. Moving back through the history of a change of some eleme

                                              How it became like this? Ruby Range class
                                            • What's New in Emacs 28.1?

                                              Try Mastering Emacs for free! Are you struggling with the basics? Have you mastered movement and editing yet? When you have read Mastering Emacs you will understand Emacs. It’s that time again: there’s a new major version of Emacs and, with it, a treasure trove of new features and changes. Notable features include the formal inclusion of native compilation, a technique that will greatly speed up y

                                              • 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
                                                • Apache Airflow 2.0 is here!

                                                  We're proud to announce that Apache Airflow 2.0.0 has been released. I am proud to announce that Apache Airflow 2.0.0 has been released. The full changelog is about 3,000 lines long (already excluding everything backported to 1.10), so for now I’ll simply share some of the major features in 2.0.0 compared to 1.10.14: A new way of writing dags: the TaskFlow API (AIP-31) (Known in 2.0.0alphas as Fun

                                                  • Renato Athaydes

                                                    Revenge of Lisp (Part 1⁄2) Background vector created by upklyak - www.freepik.com This may surprise you if you know me, but I’ve been learning Common Lisp for a few weeks now. It all started when I was reading, funnily enough, a blog post about another, much more hyped, language called Julia. The post was titled Julia and the reincarnation of Lisp, and in it the author lamented that despite his lo

                                                    • bytecode interpreters for tiny computers ⁑ Dercuano

                                                      Introduction: Density Is King (With a Tiny VM) I've previously come to the conclusion that there's little reason for using bytecode in the modern world, except in order to get more compact code, for which it can be very effective. So, what kind of a bytecode engine will give you more compact code? Suppose I want a bytecode interpreter for a very small programming environment, specifically to minim

                                                      • Exploiting Authentication in AWS IAM Authenticator for Kubernetes

                                                        Exploiting Authentication in AWS IAM Authenticator for Kubernetes Amazon Elastic Kubernetes Service (Amazon EKS) is a managed service that helps you to create, operate, and maintain Kubernetes clusters. Amazon EKS has several deployment options including AWS cloud and on-premises (Amazon EKS Anywhere). Amazon EKS uses IAM to provide authentication to the cluster through the AWS IAM Authenticator f

                                                        • 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

                                                          • 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

                                                            • 『欧米圏デジタル・ヒューマニティーズの基礎知識』特設サイト

                                                              [1] http://www.europeana.eu/portal/, accessed July 19, 2020. [2] http://discovery.dho.ie/, accessed July 19, 2020. [3] http://www.omnia.ie/, accessed July 19, 2020. [4] http://nialloleary.eu/, accessed July 19, 2020. [5] http://www.digitalnz.org/, accessed July 19, 2020. 1-8 [1] 例えば、岡崎敦「西欧中世における「書簡」資料をめぐる諸問題」新井由 紀夫(編)『「中・近世西欧における書簡とコミュニケーション」キックオフ・ シンポジウム報告書』(2018), 5-22 など。 [2] 基本的に本節の内容は、Peter S

                                                                『欧米圏デジタル・ヒューマニティーズの基礎知識』特設サイト
                                                              • OpenAssistant/oasst1 · Datasets at Hugging Face

                                                                'Jew' or 'rabbi'"},"role":{"kind":"string","value":"assistant"},"lang":{"kind":"string","value":"en"},"review_count":{"kind":"number","value":3,"string":"3"},"review_result":{"kind":"bool","value":true,"string":"true"},"deleted":{"kind":"bool","value":false,"string":"false"},"rank":{"kind":"number","value":1,"string":"1"},"synthetic":{"kind":"bool","value":false,"string":"false"},"model_name":{"ki

                                                                  OpenAssistant/oasst1 · Datasets at Hugging Face
                                                                • 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

                                                                  • July 2024 (version 1.92)

                                                                    Update 1.92.1: The update addresses these issues. Update 1.92.2: The update addresses these issues. Downloads: Windows: x64 Arm64 | Mac: Universal Intel silicon | Linux: deb rpm tarball Arm snap Welcome to the July 2024 release of Visual Studio Code. There are many updates in this version that we hope you'll like, some of the key highlights include: Default browser - Configure which browser to use

                                                                      July 2024 (version 1.92)
                                                                    • An Experienced (Neo)Vimmer's Workflow

                                                                      Motivation Ever since TJ said “Personalized Development Environment,” the phrase latched onto me like a cobweb in a mineshaft. A Personalized Development Environment (PDE) describes an ideal setup that is tailored to your needs and preferences – it lies between a bare-bone text editor and a full-fledged IDE. It is a place where you can be productive, efficient, and comfortable. It is a place that

                                                                      • Julia 1.6: what has changed since Julia 1.0?

                                                                        Julia 1.0 came out well over 2 years ago. Since then a lot has changed and a lot hasn’t. Julia 1.0 was a commitment to no breaking changes, but that is not to say no new features have been added to the language. Julia 1.6 is a huge release and it is coming out relatively soon. RC-1 was released recently. I suspect we have at least a few more weeks before the final release. The Julia Core team take

                                                                        • November 2022 (version 1.74)

                                                                          Update 1.74.1: The update addresses these issues. Update 1.74.2: The update addresses these issues. Update 1.74.3: The update addresses this security issue. Downloads: Windows: x64 Arm64 | Mac: Universal Intel silicon | Linux: deb rpm tarball Arm snap Welcome to the November 2022 release of Visual Studio Code. There are many updates in this version that we hope you'll like, some of the key highlig

                                                                            November 2022 (version 1.74)
                                                                          • The AI-Native Software Engineer

                                                                            An AI-native software engineer is one who deeply integrates AI into their daily workflow, treating it as a partner to amplify their abilities. This requires a fundamental mindset shift. Instead of thinking “AI might replace me” an AI-native engineer asks for every task: “Could AI help me do this faster, better, or differently?”. The mindset is optimistic and proactive - you see AI as a multiplier

                                                                              The AI-Native Software Engineer
                                                                            • LispText.pdf

                                                                              Lisp Common Lisp / Scheme 0.1 Copyright c � 2020, Katsunori Nakamura 2020 2 29 1 1 1.1 Common Lisp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 1.2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 1.3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 1.3.1 Lisp . . . . . .

                                                                              • Building A Generative AI Platform

                                                                                After studying how companies deploy generative AI applications, I noticed many similarities in their platforms. This post outlines the common components of a generative AI platform, what they do, and how they are implemented. I try my best to keep the architecture general, but certain applications might deviate. This is what the overall architecture looks like. This is a pretty complex system. Thi

                                                                                  Building A Generative AI Platform
                                                                                • Python behind the scenes #6: how Python object system works

                                                                                  As we know from the previous parts of this series, the execution of a Python program consists of two major steps: The CPython compiler translates Python code to bytecode. The CPython VM executes the bytecode. We've been focusing on the second step for quite a while. In part 4 we've looked at the evaluation loop, a place where Python bytecode gets executed. And in part 5 we've studied how the VM ex