並び順

ブックマーク数

期間指定

  • から
  • まで

1 - 28 件 / 28件

新着順 人気順

python typing return generatorの検索結果1 - 28 件 / 28件

  • 法律のデータ構造と検索

    デジタル庁は、法令標準 XML スキーマに準拠した、現行の法令データをe-Gov法令検索というサイト上で公開しています[1]。今回、この法令XMLをパースするPythonライブラリ ja-law-parser をつくり、法令データの全文検索をしてみました。 この記事では、日本の法令とそのデータ構造、法令XMLパーサについて解説し、最後に、それらを使った法令データの全文検索システムを実装する方法をご紹介します。法令検索の実装についても、GitHubリポジトリで公開しています。 この記事は、情報検索・検索技術 Advent Calendar 2023の16日目の記事です。 法律と法令 法律とは 法律の制定と公布 法律と法令の違い 法律の改正 法令のデータ構造 e-Govの法令データ 法令標準XMLスキーマ 法令番号と法令ID 題名 本則と附則 条・項・号 編・章・節・款・目 法令XMLパーサ:

      法律のデータ構造と検索
    • Youtubeは無限のクラウドストレージ - Qiita

      みなさん、こんな経験はありませんか もちろんありますよね。ということで無料で無限にクラウドストレージを使う方法を考えました。(月額130円で50GBは破格だけど) Youtube好き 今回使うのはYoutubeです。ほぼ全員Youtubeを見たことあると思いますが、Youtubeに動画をあげたことがある人はあんまりいないんじゃないでしょうか。 なんとこのYoutube、動画のアップロード数に制限がありません!!!じゃあファイルを動画にしてアップロードしたら好きな時にダウンロードして使えるじゃん。 動画化の方法 ということでやっていきます。まず、ファイルを動画化する方法を考えます。 すべてのファイルはバイト列なので、そいつらをそのまま画像のピクセルにして、そいつらを動画にしたらいいんじゃないかというのが一番最初に思いつくと思いますが、それは甘いです。甘すぎます。 Youtubeに動画をアップ

        Youtubeは無限のクラウドストレージ - Qiita
      • 【Python 3.12】型ヒント機能がいつの間にか進化していたので、慌ててキャッチアップする - ABEJA Tech Blog

        ABEJA でプロダクト開発を行っている平原です。 先日、バックエンドで使っているGo言語のお勉強しようと「go言語 100Tips ありがちなミスを把握し、実装を最適化する」を読んでいました。その中でinterfaceは(パッケージを公開する側ではなく)受け側で定義するべきという記述を見つけてPythonでも同じことできないかと調べていると(PythonではProtocolを使うとうまくいきそうです。)、どうやら型ヒント機能がかなりアップデートされていることに気づき慌てて再入門しました。(3.7, 3.8あたりで止まってました。。) この記事では、公式ドキュメントを見ながら適当にコードを書き散らし、どの機能はどこまで使えるのか試してみたことをまとめてみました。 docs.python.org 環境 Python: 3.12.1 エディタ: Visual Studio Code Pylan

          【Python 3.12】型ヒント機能がいつの間にか進化していたので、慌ててキャッチアップする - ABEJA Tech Blog
        • 巨人の肩に乗る

          本記事は 仮想通貨 Advent Calendar 2025 の24日目の記事です。 はじめに はじめまして、ymdと申します。普段は、株や暗号資産の分析をし、マーケットが盛り上がったときに落ちているお金を拾っています。 今年のAdvent Calendarを眺めていると、DEXの分析やLLMを活用した自動トレード戦略作成など、非常に有益な記事が目白押しです。 これらを見て思い出したのが、ニュートンの「巨人の肩に乗る」という言葉。本記事では、この精神に倣い、AIの力と先人の知見という2つの「肩」を借りながら、お金拾いの方法を探っていきます。 AIの肩に乗る AI駆動開発の3つのアプローチ AIを活用した開発には、大きく3つの方向性があります: 情報収集の自動化:論文や API ドキュメントの要約 戦略生成の自動化:複数のアプローチを並行生成 コーディングの自動化:コードそのものを AI に

            巨人の肩に乗る
          • 【実践】PythonとOpenStreetMapで学ぶ経路システム開発入門 - uepon日々の備忘録

            前回はGoogle Map APIを使用して開発を行いましたが、今回はOpenStreetMapを使用した似たようなことにチャレンジしてみようと思います。Pythonを使ってOpenStreetMapの経路検索URLを生成する方法ことを目的とします。 参考 uepon.hatenadiary.com オープンストリートマップ(OpenStreetMap)とは? オープンストリートマップ(英語: OpenStreetMap、OSM)は、自由に利用でき、なおかつ編集機能のある世界地図を作るオープンコラボレーションプロジェクトである。GPS機能を持った携帯機器、空中写真、衛星画像、他の地理情報システムからのデータをもとに作られていくのが基本だが、編集ツール上で道1本から手入力での追加も可能である。与えられた画像とベクトルデータセットはオープンデータベースライセンス(ODbL)1.0のもと再利用可

              【実践】PythonとOpenStreetMapで学ぶ経路システム開発入門 - uepon日々の備忘録
            • データ検証ライブラリPydanticの紹介 | gihyo.jp

              寺田 学(@terapyon)です。2025年10月の「Python Monthly Topics」は、データ検証ライブラリのPydanticを紹介します。 型安全とデータ構造 主題のPydanticの説明に入る前に、Pythonにおける型安全の考え方とデータ構造についておさらいしておきます。 型安全のための型ヒント Pythonは動的型付け言語です。型を宣言せずにコーディングすることができますが、型ヒントを書くことで型安全にコーディングできます。最近のPythonコードには型ヒントが書かれていることが多くなっているかと思います。 本連載(Python Monthly Topics)でも過去に型ヒント関係のトピックを扱っていますので、参照してください。 2022年9月:Python最新バージョン対応!より良い型ヒントの書き方 2024年11月:Python型ヒントの動向と新しい機能の紹介

                データ検証ライブラリPydanticの紹介 | gihyo.jp
              • Dataflow Indexer データ整合性担保と性能改善 - LegalOn Technologies Engineering Blog

                はじめに こんにちは。LegalOn Technologies 検索・推薦チームの臼井(jusui)です。 私たちのチームは、LegalOn Technologies が提供する主要サービス—「LegalOn Cloud」、「LegalForce」、「LegalForceキャビネ」—の検索・推薦システムの開発と運用を担当しています。 2024年7月に当チームから「Dataflow 実践開発セットアップ」を公開しました。 tech.legalforce.co.jp 今回は、2024年4月から提供開始した弊社の新サービス「LegalOn Cloud」の初回リリースに向けて開発した Indexing pipeline とその後の改善についてご紹介します。具体的には、Cloud Pub/Sub と Cloud Dataflow を活用した Indexing pipeline の開発により、Elas

                  Dataflow Indexer データ整合性担保と性能改善 - LegalOn Technologies Engineering Blog
                • RAGの取りこぼしを減らすには? — Corrective RAG で検索ミスを“後から直す”

                  はじめに ルミナイR&Dチームの栗原です。 前回の記事では、Self-RAG を題材に、 Retrieve / Generate / Critique の三段構えで LLM 自身に「検索する?」「この回答どう?」を考えさせる仕組み Reflection Tokens(<RET> や ISREL / ISSUP / ISUSE)のアイデア それを OpenAI + 既存RAG で真似する「Self-RAG もどき」実装 をざっくり整理しました。 Self-RAG の視点はどちらかというと、 モデル側に自己批評させて、 “いつ・どれだけ検索するか” を賢くする という方向でした。 一方、RAG にはもう一つ大きな問題があります。 retriever が外して 関係ない or 古いドキュメント を持ってくると… LLM はそれを「根拠」だと信じて、 もっともらしい誤答(幻覚)を増幅してしまう こ

                    RAGの取りこぼしを減らすには? — Corrective RAG で検索ミスを“後から直す”
                  • RFC 9562: Universally Unique IDentifiers (UUIDs)

                     Internet Engineering Task Force (IETF) K. Davis Request for Comments: 9562 Cisco Systems Obsoletes: 4122 B. Peabody Category: Standards Track Uncloud ISSN: 2070-1721 P. Leach University of Washington May 2024 Universally Unique IDentifiers (UUIDs) Abstract This specification defines UUIDs (Universally Unique IDentifiers) -- also known as GUIDs (Globally Unique IDentifiers) -- and a Uniform Resou

                      RFC 9562: Universally Unique IDentifiers (UUIDs)
                    • June 2022 (version 1.69)

                      Update 1.69.1: The update addresses these issues. Update 1.69.2: The update addresses these issues. Downloads: Windows: x64 Arm64 | Mac: Universal Intel silicon | Linux: deb rpm tarball Arm snap Welcome to the June 2022 release of Visual Studio Code. There are many updates in this version that we hope you'll like, some of the key highlights include: 3-way merge editor - Resolve merge conflicts wit

                        June 2022 (version 1.69)
                      • Pydantic AIで作る!実践Text-to-SQLシステム構築ガイド 〜自然言語によるデータ抽出の自動化で分析業務を効率化〜

                        Pydantic AIで作る!実践Text-to-SQLシステム構築ガイド 〜自然言語によるデータ抽出の自動化で分析業務を効率化〜 こんにちは、Ubieでアナリティクスエンジニア/データアナリストをしているmatsu-ryuです。 普段は、Ubieが提供するサービスから得られる様々なデータを活用し、「テクノロジーで人々を適切な医療に案内する」というミッションの実現に向けて取り組んでいます。 皆さんの職場では、こんなやり取りはありませんか? 「先月のカテゴリ別売上トップ3、都道府県別で出せますか?」 「レビュー評価が星1つの商品のリストと、その商品を買ったユーザーのリストをお願いします。」 データドリブンな意思決定が重視される昨今、こうしたデータ抽出・分析の依頼は日常的に発生します。しかし、その裏側では多くの組織が共通の課題を抱えています。 SQLの壁: 分析したい人が必ずしもSQLを書ける

                          Pydantic AIで作る!実践Text-to-SQLシステム構築ガイド 〜自然言語によるデータ抽出の自動化で分析業務を効率化〜
                        • Real-world gen AI use cases from the world's leading organizations | Google Cloud Blog

                          AI is here, AI is everywhere: Top companies, governments, researchers, and startups are already enhancing their work with Google's AI solutions. Published April 12, 2024; last updated October 9, 2025. Automotive & Logistics Business & Professional Services Financial Services Healthcare & Life Sciences Hospitality & Travel Manufacturing, Industrial & Electronics Media, Marketing & Gaming Public Sec

                            Real-world gen AI use cases from the world's leading organizations | Google Cloud Blog
                          • RAGの精度を上げる自己評価付き検索の設計 — Self-RAGで「検索+自己採点」を回す

                            はじめに ルミナイR&Dチームの栗原です。 ここまでの記事では、レビュー論文 “Retrieval-Augmented Generation for Large Language Models: A Survey” (Gao et al., 2024) を手がかりに、 Fig.2 / Fig.3:RAG の基本フローと Naive / Advanced / Modular RAG の違い Fig.4:Prompt / Fine-tuning / RAG の「守備範囲」と使い分け方 Fig.5:Iterative / Recursive / Adaptive Retrieval という、エージェント寄り RAG のフロー RAG の評価:LLM に採点させる RAGAS もどき のミニ実装 をざっくり整理してきました。 ここまでの流れは、だいたい次のような前提を置いていました。 毎回、固定の

                              RAGの精度を上げる自己評価付き検索の設計 — Self-RAGで「検索+自己採点」を回す
                            • Pythonクイックリファレンス 第4版

                              本書はPythonの機能を十分に活用するためのリファレンスです。チュートリアルとしての「Pythonを使ってみる」、型アノテーションや文字列といった「Python言語と組み込み機能」、ファイルやテキスト、時間の操作、数値処理などをまとめた「Pythonの標準ライブラリと拡張モジュール」、HTTPの処理や構造化テキストを学ぶ「ネットワークとWebプログラミング」、バージョン移行などに関する「拡張、配布、バージョンのアップグレードと移行」という5部構成となっています。Pythonを本格的に学びたい人から、さらなるスキルアップを目指したい人まで、Pythonを最大限に活用するための有益な情報がぎっちり詰まった1冊です。Python 3.11対応。 正誤表 ここで紹介する正誤表には、書籍発行後に気づいた誤植や更新された情報を掲載しています。以下のリストに記載の年月は、正誤表を作成し、増刷書籍を印刷

                                Pythonクイックリファレンス 第4版
                              • xvw.lol - Why I chose OCaml as my primary language

                                This article is a translation, the original version is available here. I started using the OCaml language regularly around 2012, and since then, my interest and enthusiasm for this language have only grown. It has become my preferred choice for almost all my personal projects, and it has also influenced my professional choices. Since 2014, I have been actively participating in public conferences d

                                • FastAPIのスキーマクラスをOpenAPIから生成する方法 | GiFT(ギフト)株式会社

                                  OpenAPI定義からFastAPIで利用するスキーマクラスを出力すると何が良いのか? OpenAPI定義のみで設計の確認が可能 FastAPIでクラスを書く必要がなくなる OpenAPIの準備 FastAPIのソースコードとOpenAPI定義は以下のような構成で準備します。 ちなみに定義ファイルのパスが generated/openapi.json となっているのは、openapi-generatorを利用してopenapi.jsonを生成していて、弊社ではよくこの構成で開発しています。 project L api L main.py : FastAPIのmain.py L schema L generated L openapi.json : OpenAPI定義ファイル datamodel-code-generatorのインストール OpenAPI定義からschemaクラスを生成するに

                                    FastAPIのスキーマクラスをOpenAPIから生成する方法 | GiFT(ギフト)株式会社
                                  • 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
                                    • 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

                                      • 🤓 So you're using a weird language 🧠

                                        Tuesday, September 13, 2022 :: Tagged under: engineering. ⏰ 11 minutes. Hey! Thanks for reading! Just a reminder that I wrote this some years ago, and may have much more complicated feelings about this topic than I did when I wrote it. Happy to elaborate, feel free to reach out to me! 😄 🎵 The song for this post is I, Don Quixote from the musical Man of La Mancha, composed by Mitch Leigh and Joe

                                          🤓 So you're using a weird language 🧠
                                        • LambdaLisp - A Lisp Interpreter That Runs on Lambda Calculus

                                          LambdaLisp is a Lisp interpreter written as an untyped lambda calculus term. The input and output text is encoded into closed lambda terms using the Mogensen-Scott encoding, so the entire computation process solely consists of the beta-reduction of lambda calculus terms. When run on a lambda calculus interpreter that runs on the terminal, it presents a REPL where you can interactively define and e

                                            LambdaLisp - A Lisp Interpreter That Runs on Lambda Calculus
                                          • May 2024 (version 1.90)

                                            Update 1.90.2: The update addresses these issues. Update 1.90.1: The update addresses these issues. Downloads: Windows: x64 Arm64 | Mac: Universal Intel silicon | Linux: deb rpm tarball Arm snap Welcome to the May 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: Editor tabs multi-select - Select and perform act

                                              May 2024 (version 1.90)
                                            • SageMaker + vLLM で LLM API を構築 - asken テックブログ

                                              目次 はじめに この記事で学べること 前提知識 技術スタックの全体像 各コンポーネントの詳細解説 パフォーマンス設計 構築手順 まとめ 参考リンク はじめに この記事は、株式会社asken (あすけん) Advent Calendar 2025の12/23の記事です。 こんにちは。AX推進部(テックリード・AIエンジニア)の山口です。 今回は、SageMakerでvLLMを動かす方法を説明したいと思います。 LLM を API として提供する際の課題 ChatGPT のような LLM を自社サービスに組み込みたい場合、以下のような課題があります: レイテンシ(応答時間): ユーザーがテキストを入力してから結果が返るまでの時間。長いとユーザー体験が悪化します スループット(処理能力): 同時に多くのリクエストを処理できるか コスト: GPU は高価なので、効率的に使いたい 運用負荷: サーバ

                                                SageMaker + vLLM で LLM API を構築 - asken テックブログ
                                              • Python Interview Questions

                                                Here is a list of common Python interview questions with detailed answers to help you prepare for the interview as a Python developer. Python, with its versatile use cases and straightforward syntax, has seen its popularity growing continuously in software development, data science, artificial intelligence, and many other fields. As such, interviews for Python-related positions are designed not on

                                                  Python Interview Questions
                                                • Sketch of a Post-ORM

                                                  I’ve been writing a lot of database access code as of late. It’s frustrating that in 2023, my choices are still to either write all of the boilerplate by hand, or hand all database access over to some inscrutable “agile” ORM that will become a crippling liability in the 2-3y timescale. This post is about how I want to use databases, from the perspective of an application server developer—not a DBA

                                                    Sketch of a Post-ORM
                                                  • 【Python】素数のリストを作成するアルゴリズム - Qiita

                                                    # 関数に型明示ができるようにする from typing import List, Generator # 素数を抽出する関数(与えた数字までの素数を抽出する) def generate_primes_v1(numbers: int) -> List[int]: # 空のリストの作成 primes = [] # for文を何回回したか i = 0 for x in range(2, numbers + 1): for y in range(2, x): # for文カウント i += 1 # 余りが0の時は含めない if x % y == 0: break else: # for文カウント i += 1 primes.append(x) # for文を回した回数の表示 print("v1=", i, "回") return primes def generate_primes_v2(nu

                                                      【Python】素数のリストを作成するアルゴリズム - Qiita
                                                    • Following up on the Python JIT

                                                      Performance of Python programs has been a major focus of development for the language over the last five years or so; the Faster CPython project has been a big part of that effort. One of its subprojects is to add an experimental just-in-time (JIT) compiler to the language; at last year's PyCon US, project member Brandt Bucher gave an introduction to the copy-and-patch JIT compiler. At PyCon US 20

                                                      • Philosophy of coroutines

                                                        [Simon Tatham, initial version 2023-09-01, last updated 2025-03-25] [Coroutines trilogy: C preprocessor | C++20 native | general philosophy ] Introduction Why I’m so enthusiastic about coroutines The objective view: what makes them useful? Versus explicit state machines Versus conventional threads The subjective view: why do I like them so much? “Teach the student when the student is ready” They s

                                                        • Using Python to Simplify Data Operations in Data Science

                                                          In Data Science, we primarily use Python as a programming language to perform operations on the available datasets. This article will discuss concepts and details for using Pythons to simplify data operations in data science. Pros and Cons of Python for Data OperationsEven though the pros outweigh the cons, it is crucial to look at both aspects. So, let’s have a look at the advantages and limitati

                                                            Using Python to Simplify Data Operations in Data Science
                                                          1