並び順

ブックマーク数

期間指定

  • から
  • まで

1 - 19 件 / 19件

新着順 人気順

validate if input is integer pythonの検索結果1 - 19 件 / 19件

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

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

      関数名、メソッド名、変数名でよく使う英単語のまとめ
    • 型安全かつシンプルなAgentフレームワーク「PydanticAI」の実装を解剖する - ABEJA Tech Blog

      はじめに こちらはABEJAアドベントカレンダー2024 12日目の記事です。 こんにちは、ABEJAでデータサイエンティストをしている坂元です。最近はLLMでアプローチしようとしていたことがよくよく検証してみるとLLMでは難しいことが分かり急遽CVのあらゆるモデルとレガシーな画像処理をこれでもかというくらい詰め込んだパイプラインを実装することになった案件を経験して、LLMでは難しそうなことをLLM以外のアプローチでこなせるだけの引き出しとスキルはDSとしてやはり身に付けておくべきだなと思うなどしています(LLMにやらせようとしていることは大抵難しいことなので切り替えはそこそこ大変)。 とはいうものの、Agentの普及によってより複雑かつ高度な推論も出来るようになってきています。弊社の社内外のプロジェクト状況を見ていても最近では単純なRAG案件は減りつつあり、計画からアクションの実行、結果

        型安全かつシンプルなAgentフレームワーク「PydanticAI」の実装を解剖する - ABEJA Tech Blog
      • krish's blog • Parsing JSON in 500 lines of Rust

        Last semester at university, I took a course called "Syntax-Based Tools and Compilers". It focused on building a scanner, parser, compiler, and so on for a language called PL0. We used Python in the course, but I was really interested in learning Rust at the time. So, I decided to embark on a side project (yes, another one!). This time, I wanted to build a JSON parser in Rust. My goal was to test

          krish's blog • Parsing JSON in 500 lines of Rust
        • Parsing SQL - Strumenta

          The code for this tutorial is on GitHub: parsing-sql SQL is a language to handle data in a relational database. If you worked with data you have probably worked with SQL. In this article we will talk about parsing SQL. It is in the same league of HTML: maybe you never learned it formally but you kind of know how to use it. That is great because if you know SQL, you know how to handle data. However

            Parsing SQL - Strumenta
          • 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

            • The OpenSSL punycode vulnerability (CVE-2022-3602): Overview, detection, exploitation, and remediation | Datadog Security Labs

              emerging threats and vulnerabilities The OpenSSL punycode vulnerability (CVE-2022-3602): Overview, detection, exploitation, and remediation November 1, 2022 emerging vulnerability On November 1, 2022, the OpenSSL Project released a security advisory detailing a high-severity vulnerability in the OpenSSL library. Deployments of OpenSSL from 3.0.0 to 3.0.6 (included) are vulnerable and are fixed in

                The OpenSSL punycode vulnerability (CVE-2022-3602): Overview, detection, exploitation, and remediation | Datadog Security Labs
              • 0.8.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

                • Manus tools and prompts

                  agent loop �� �p�� You are Manus, an AI agent created by the Manus team. You excel at the following tasks: 1. Information gathering, fact-checking, and documentation 2. Data processing, analysis, and visualization 3. Writing multi-chapter articles and in-depth research reports 4. Creating websites, applications, and tools 5. Using programming to solve various problems beyond development 6. Variou

                    Manus tools and prompts
                  • 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

                    • ChatVectorで新モデル作って評価して遊ぶヤツ、自分もやりたい

                      最近、一部のローカルLLM勢のあいだでChatVectorで遊ぶのが流行っている。 ChatVectorとは何か?というとこちらの論文で発表された技術だ。 [2310.04799] Chat Vector: A Simple Approach to Equip LLMs with Instruction Following and Model Alignment in New Languages (arxiv.org) こちらの解説記事が分かりやすい。 Chat Vectorを使って日本語LLMをチャットモデルに改造する – Qiita 要するに、ChatVectorとは指示チューニングでチャット能力を獲得したモデルのウエイトから、ベースになったモデルのウエイトを差し引いた差分の事である。 そしてChatVectorを別のモデルのウエイトに加算すれば、そのモデルにチャット能力を付与する事が

                        ChatVectorで新モデル作って評価して遊ぶヤツ、自分もやりたい
                      • Ubuntu 24.04 LTS (Noble Numbat) Release Notes

                        Noble Numbat Release Notes Table of Contents Introduction New features in 24.04 LTS Known Issues Official flavours More information Introduction These release notes for Ubuntu 24.04 LTS (Noble Numbat) provide an overview of the release and document the known issues with Ubuntu and its flavours. For details of the changes applied since 24.04, please see the 24.04.2 change summary. Support lifespan

                        • A from-scratch tour of Bitcoin in Python

                          I find blockchain fascinating because it extends open source software development to open source + state. This seems to be a genuine/exciting innovation in computing paradigms; We don’t just get to share code, we get to share a running computer, and anyone anywhere can use it in an open and permissionless manner. The seeds of this revolution arguably began with Bitcoin, so I became curious to dril

                          • Accelerating Generative AI with PyTorch: Segment Anything, Fast – PyTorch

                            Blog Accelerating Generative AI with PyTorch: Segment Anything, Fast This post is the first part of a multi-series blog focused on how to accelerate generative AI models with pure, native PyTorch. We are excited to share a breadth of newly released PyTorch performance features alongside practical examples of how these features can be combined to see how far we can push PyTorch native performance.

                              Accelerating Generative AI with PyTorch: Segment Anything, Fast – PyTorch
                            • Supercharge Your NodeJS With Rust - Dmitry Kudryavtsev

                              Node isn’t the fastest framework out here. It’s not the slowest either, v8 is doing wonders to its speed, but nevertheless, if we setup an unfair battle between Node and say Rust; Node will lose. If you are interested to compare this approach to WebAssembly, I’ve written a new article on WASM in comparison to native modules. What is Rust? Rust is a multi-paradigm, high-level, general-purpose progr

                                Supercharge Your NodeJS With Rust - Dmitry Kudryavtsev
                              • 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
                                • GTF :: Why Haskell?

                                  “Impractical”, “academic”, “niche”. These are a few of the reactions I get when someone discovers that my favourite programming language is Haskell, and not only my favourite in some sort of intellectually-masturbatory way, but favourite for building things, real things, mostly involving web servers. Hobby projects would be one thing, but it gets worse: I have actual teams at Converge working in H

                                  • Node.js

                                    Notable Changes Experimental command-line argument parser API Adds util.parseArgs helper for higher level command-line argument parsing. Contributed by Benjamin Coe, John Gee, Darcy Clarke, Joe Sepi, Kevin Gibbons, Aaron Casanova, Jessica Nahulan, and Jordan Harband - #42675 Experimental ESM Loader Hooks API Node.js ESM Loader hooks now support multiple custom loaders, and composition is achieved

                                      Node.js
                                    • Version 1.0

                                      Version 1.0# For a short description of the main highlights of the release, please refer to Release Highlights for scikit-learn 1.0. Legend for changelogs Major Feature something big that you couldn’t do before. Feature something that you couldn’t do before. Efficiency an existing feature now may not require as much computation or memory. Enhancement a miscellaneous minor improvement. Fix somethin

                                      • Django for Startup Founders: A better software architecture for SaaS startups and consumer apps

                                        In an ideal world, startups would be easy. We'd run our idea by some potential customers, build the product, and then immediately ride that sweet exponential growth curve off into early retirement. Of course it doesn't actually work like that. Not even a little. In real life, even startups that go on to become billion-dollar companies typically go through phases like: Having little or no growth fo

                                        1