並び順

ブックマーク数

期間指定

  • から
  • まで

1 - 32 件 / 32件

新着順 人気順

python dict remove key if not in listの検索結果1 - 32 件 / 32件

  • LangChainを使わない - ABEJA Tech Blog

    TL; DR LangChainのメリデメを整理する過程で、今となってはopenai-pythonのうちChatGPTのAPIをを簡単に取り回せる程度のシンプルなライブラリがあるだけでも十分便利なんじゃないかと思ったので、ライブラリを個人で作ってみました。(バージョン0.0.1なのでちょっとお粗末な所もありますが) github.com はじめに こんにちは、データサイエンティストの坂元です。ABEJAアドベントカレンダーの13日目の記事です。世は大LLM時代ということで、ありがたいことにABEJAでも複数のLLMプロジェクトを推進させて頂いています。私自身もいくつかのLLMプロジェクトに参画しています。LLMといえばLangChainが便利ですね。OpenAI APIの利用だけでなく、各種ドキュメントのパースが出来たり、HuggingFaceやインデックスDBを扱う他のライブラリとインテ

      LangChainを使わない - ABEJA Tech Blog
    • 既存リソースをTerraformでimportする作業を楽にする - KAYAC Engineers' Blog

      SREチームの今です。 カヤックでは、クラウドリソースの管理にはTerraformを利用することが多いです。 クラウドリソースの構成や設定をコードで管理することで、リソースの変更内容の差分をレビューできる、意図しない設定変更を発見できるなどの利点があり、SREの目的であるサービスを安定して提供する上で重要な要素の一つです。 実際の作業として、既に運用中のサービスを新たにTerraform管理下に置く場合や、多くのリソースが既にweb consoleから作成されているものをTerraform管理下に追加する場合も多いと思います。 その際にはTerraform importをする必要があります。しかし、Terraform importは単純作業とはいえ時間と手間がかかり、優先順位を下げてついつい後回しにしてしまうことも多いのではないでしょうか。 今回は、手作業でTerraform import

        既存リソースをTerraformでimportする作業を楽にする - KAYAC Engineers' Blog
      • GPT in 60 Lines of NumPy | Jay Mody

        January 30, 2023 In this post, we'll implement a GPT from scratch in just 60 lines of numpy. We'll then load the trained GPT-2 model weights released by OpenAI into our implementation and generate some text. Note: This post assumes familiarity with Python, NumPy, and some basic experience with neural networks. This implementation is for educational purposes, so it's missing lots of features/improv

        • 型安全かつシンプルなAgentフレームワーク「PydanticAI」の実装を解剖する - ABEJA Tech Blog

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

            型安全かつシンプルなAgentフレームワーク「PydanticAI」の実装を解剖する - ABEJA Tech Blog
          • ChatGPT Retrieval Pluginに任意のベクトル検索エンジンProviderを実装する - エムスリーテックブログ

            Overview エムスリーエンジニアリンググループ AI・機械学習チームでソフトウェアエンジニアをしている中村(po3rin) です。検索とGoが好きです。 エムスリーではChatGPTの可能性にいち早く注目して活用を検討している段階ですが、本格的なデータ投入にはまだ懸念もあり、セキュリティチームと検討を進めている段階です。 そんな中で個人または組織のドキュメントのセマンティック検索と取得を可能にするChatGPTプラグイン「ChatGPT Retrieval Plugin」が登場しました。 github.com 情報検索好きとしては黙っていられず、外部公開用のエムスリーAI・機械学習チームのメンバー紹介ドキュメントを使ってローカルで試してみました。 # 用意したドキュメント 中村弘武は東京都在住で、エムスリーという企業で働いでいます。 エムスリーの検索基盤を主に担当しています。また、書

              ChatGPT Retrieval Pluginに任意のベクトル検索エンジンProviderを実装する - エムスリーテックブログ
            • Sublime Text 4

              The first stable release of Sublime Text 4 has finally arrived! We've worked hard on providing improvements without losing focus on what makes Sublime Text great. There are some new major features that we hope will significantly improve your workflow and a countless number of minor improvements across the board. A huge thanks goes out to all the beta testers on discord and all the contributors to

                Sublime Text 4
              • A viable solution for Python concurrency

                Concerns over the performance of programs written in Python are often overstated — for some use cases, at least. But there is no getting around the problem imposed by the infamous global interpreter lock (GIL), which severely limits the concurrency of multi-threaded Python code. Various efforts to remove the GIL have been made over the years, but none have come anywhere near the point where they w

                • Solving Quantitative Reasoning Problems With Language Models

                  Solving Quantitative Reasoning Problems with Language Models Aitor Lewkowycz∗, Anders Andreassen†, David Dohan†, Ethan Dyer†, Henryk Michalewski†, Vinay Ramasesh†, Ambrose Slone, Cem Anil, Imanol Schlag, Theo Gutman-Solo, Yuhuai Wu, Behnam Neyshabur∗, Guy Gur-Ari∗, and Vedant Misra∗ Google Research Abstract Language models have achieved remarkable performance on a wide range of tasks that require

                  • データカタログにConnected SheetsやLooker Studioの情報を取り込んでレポートのデータソースを追跡する - LayerX エンジニアブログ

                    はじめに こんにちは!バクラク事業部 機械学習・データ部 データチームの@TrsNiumです。 弊社では、データの意味やデータの質、データの利活用を一元的に管理することを目的として、データカタログソリューションの一種であるOpenMetadataを導入しました。OpenMetadataを利用することで、様々な種類のデータベースやBI、CRMと連携し、データの管理と可視化を効率化しています。 弊社では主にBIツールとしてLooker Studioを使用しています。また、Google SheetsはConnected Sheetsの機能を使い、BigQuery上に構築されたデータ基盤のデータを用いて簡易的にデータ分析や可視化を行うツールとして利用しています。しかし、これらのツールはOpenMetadataのビルトイン機能ではサポートされていませんでした。そのため、データ変更時の影響範囲の把握や

                      データカタログにConnected SheetsやLooker Studioの情報を取り込んでレポートのデータソースを追跡する - LayerX エンジニアブログ
                    • Velja

                      Open links in a specific browser or a matching native app. Easily switch between browsers. In-depth review of Velja. Trusted by almost 130K users. You may also like my Default Browser app. Example use-cases Use Safari as your primary browser but open Google Meet links in Chrome Open links to figma.com directly in the Figma desktop app Open links to the internal company website in Firefox Open Zoom

                        Velja
                      • 【論文詳解】RestGPT: ユーザ指示からRESTful APIを実行する新たなLLMエージェント

                        はじめに 初めまして、株式会社Carnotでインターンをしている長谷川と申します。 Carnotでは、LLMを活用し日々の業務フローの効率化や自動化をするためのソリューション「Promptflow」の開発を行っています。 上記のようなワークフローを作成する際には、SlackやGmail、Notionなど各サービスのAPIを連携させていく必要があります。しかし、そのような開発にはプログラミングの知識が必須で、非エンジニアにとってAPIを用いたシステムを作成することは難しいと思われます。そこで、今回は言語のみの指示から複数のAPIを呼び出すことが可能なRestGPTという手法を調査しました。 例えば音楽配信サービスを使う中で「YOASOBIが出した最新のアルバムを自分のプレイリストに追加する」という作業をしたい時、これを自分で行うのは面倒である上、コードを書いて自動化するのも非エンジニアにとっ

                          【論文詳解】RestGPT: ユーザ指示からRESTful APIを実行する新たなLLMエージェント
                        • Ordering Movie Credits With Graph Theory

                          At Endcrawl we're always thinking about the hard work that goes into making film and TV, and how that work translates to on-screen credits. A feature film may involve thousands of people, hundreds of distinct job titles or "roles," and dozens of departments. So there's plenty for a producer to worry about, like: Did we forget or misspell a name? Is this the correct way to credit that role? Do all

                            Ordering Movie Credits With Graph Theory
                          • 【GROMACS】Umbrella samplingによるMD simulation 【In silico創薬】【SMD】 - LabCode

                            Windows 11 Home, 13th Gen Intel(R) Core(TM) i7-13700, 64 ビット オペレーティング システム、x64 ベース プロセッサ, メモリ:32GB Umbrella Samplingの概要と目的Umbrella Samplingは、分子がめったに起こさないような状態変化(たとえば、タンパク質同士が離れるなど)を詳しく調べるための計算手法です。通常の分子動力学(MD)では、エネルギー的に安定な状態にとどまりやすく、重要な変化が起こる確率が低いため、十分な情報が得られません。 たとえば、タンパク質AとBがくっついている状態から、少しずつ離れていく様子を観察したいとき、まずAとBを少しずつ引き離すSteered Molecular Dynamics(SMD)などのシミュレーションで、さまざまな距離の構造を取得します。その中から、0.5nm、0.7

                            • EC2インスタンスのユーザーデータ内のdnfコマンドやyumコマンドが失敗する場合の緩和策を考えてみた | DevelopersIO

                              ユーザーデータでパッケージのインストールをしようとすると失敗するんだが こんにちは、のんピ(@non____97)です。 皆さんはEC2インスタンスのユーザーデータでdnfコマンドやyumコマンドが失敗したことはありますか? 私はあります。 具体的にはユーザーデータでdnf upgradeやdnf install パッケージ名を実行すると、以下のようにRPM: error: can't create transaction lock on /var/lib/rpm/.rpm.lock (Resource temporarily unavailable)とログが出力されます。 $ dnf upgrade -y --releasever=latest Amazon Linux 2023 repository 30 MB/s | 23 MB 00:00 Amazon Linux 2023 Ker

                                EC2インスタンスのユーザーデータ内のdnfコマンドやyumコマンドが失敗する場合の緩和策を考えてみた | DevelopersIO
                              • Basic Music Theory in ~200 Lines of Python | Manohar Vanga

                                Note: all the code for this article can be found here as a Github gist. There’s also a nice discussion on Hacker News with lots of comments that might be of interest. I’m a self-taught guitarist of many years, and like a lot of self-taught musicians, am woefully inept at (Western) music theory. So naturally, I decided to write some code. This article explains the very basics of Western music theor

                                  Basic Music Theory in ~200 Lines of Python | Manohar Vanga
                                • 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
                                    • ChatGPT時代に必要かも!? Pythonで実行するファイルパース(PowerPoint編) | DevelopersIO

                                      こんちには。 データアナリティクス事業本部 インテグレーション部 機械学習チームの中村です。 今回は話題のChatGPTにコンテキストを与える際に必要となるファイルパース処理について見ていきたいと思います。 PowerPointに焦点を絞ってみていきます。既存のライブラリ内の実装も確認していきます。 先行事例の実装 先行事例の実装として、よく話題となる以下のライブラリを見ていきます。 (LlamaIndexとLlamaHubはほぼ同じですが、parserとしては片方にしかないものもあるため) LlamaIndex https://github.com/jerryjliu/llama_index https://gpt-index.readthedocs.io/en/latest/index.html LlamaHub https://github.com/emptycrown/llama-

                                        ChatGPT時代に必要かも!? Pythonで実行するファイルパース(PowerPoint編) | DevelopersIO
                                      • A Lisp REPL as my main shell

                                        If you enjoy this article and would like to help me keep writing, consider chipping in, every little bit helps to keep me going :) Thank you! Update: As of 2021-02-07, not all the code and configurations used in this presentation have been published. Should happen in the coming days, stay tuned! Introduction video The concepts I’m going to present in this article were featured in a presentation at

                                        • はじめての自然言語処理 Transformer 系モデルの推論高速化の検証 | オブジェクトの広場

                                          今回は Transformer 系のモデル、具体的には BERT, T5, GPT の推論を高速化してみます。高速化手法として FasterTransformer, Torch-TensorRT, AWS Neuron を用い、素 の transfomers に比べ、どの程度速くなるか(ならないか)、利点・欠点を確認してみましょう。 1. はじめに 今回は Transformer 系のモデル、具体的には BERT, T5, GPT の推論を様々な技術を使って高速化してみます。 高速化の元ネタは Hugging Face の transformers1 縛りとして、素の transformers で推論する場合に比べ、 どの程度速くなるか(ならないか)見てみましょう。 推論を高速化する技術としては FasterTransfomer2, Torch-TensorRT3, AWS Neuron(

                                            はじめての自然言語処理 Transformer 系モデルの推論高速化の検証 | オブジェクトの広場
                                          • 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

                                            • Lisp as an Alternative to Java

                                              In the October 1999 Communications of the ACM Lutz Prechelt had an interesting article entitled Comparing Java vs. C/C++ Efficiency Issues to Interpersonal Issues which asked 38 programmers to implement versions of a program in C, C++, or Java. The conclusions showed that Java was 3 or 4 times slower than C or C++, but that the variance between programmers was larger than the variance between lang

                                              • プログラムの言語変換 & ローカル依存ファイルの集約を行うワークフロー(LangGraph・並列処理)

                                                上記のとおり、「parallel_document_massege」~ 「parallel_create_code」までが並列で処理されるノードです。ある程度ノードをまとめてしまってもよいですが、処理ごとに分けておくとノードの付け替えなどでカスタマイズがしやすいかと思います。 コーディング 使用したライブラリ コード内で使用した外部ライブラリとインストールコマンドは以下です。 $ pip install chardet==5.2.0 $ pip install aiofiles==23.2.1 $ pip install ipython==8.27.0 $ pip install langchain-core==0.3.28 $ pip install langchain-anthropic==0.3.0 $ pip install langgraph==0.2.60 import os

                                                  プログラムの言語変換 & ローカル依存ファイルの集約を行うワークフロー(LangGraph・並列処理)
                                                • ツイッタートレンド解析のためのプログラム(個人的メモ) - Qiita

                                                  Deleted articles cannot be recovered. Draft of this article would be also deleted. Are you sure you want to delete this article? こんにちは。自分は現在駒澤大学GMS学部の2年生でタイトルにあるように**ツイッターのトレンドについて研究しています。**この記事では研究やコードや参考になりそうなものを紹介します。 元々、ツイッタートレンドに興味があり、1年生の頃から、PythonとTwitterAPIとMeCabを使っていましたが、形態素解析して単語ごとに集計するという原始的なものでした。他に言語と位置情報や出現する漢字などで遊んでいました() ↓ そしてN-gramの要領で例えば2-12単語節ごとに記録し、全てを集計する簡易的なトレンド解析ができました。補足として

                                                    ツイッタートレンド解析のためのプログラム(個人的メモ) - Qiita
                                                  • Renato Athaydes

                                                    Revisiting Prechelt’s paper and follow-ups comparing Java, Lisp, C/C++ and scripting languages A discussion on programming languages' impact on productivity and program efficiency. In 1999, Lutz Prechelt published a seminal article on the COMMUNICATIONS OF THE ACM (October 1999/Vol. 42, No. 10) called Comparing Java vs. C/C++ Efficiency Differences to Interpersonal Differences, henceforth Java VS

                                                    • Forward Incoming Email to an External Destination | Amazon Web Services

                                                      AWS Messaging Blog Forward Incoming Email to an External Destination Note: This post was written by Vesselin Tzvetkov, an AWS Senior Security Architect, and by Rostislav Markov, an AWS Senior Engagement Manager. Amazon SES has included support for incoming email for several years now. However, some customers have told us that they need a solution for forwarding inbound emails to domains that aren’

                                                        Forward Incoming Email to an External Destination | Amazon Web Services
                                                      • Investigating a backdoored PyPi package targeting FastAPI applications | Datadog Security Labs

                                                        Introduction FastAPI is a highly popular Python web framework. On November 23rd, 2022, the Datadog Security Labs team identified a third-party utility Python package on PyPI related to FastAPI, fastapi-toolkit, that has been backdoored by a malicious actor. The attacker inserted a backdoor in the package, adding a FastAPI route allowing a remote attacker to execute arbitrary python code and SQL qu

                                                          Investigating a backdoored PyPi package targeting FastAPI applications | Datadog Security Labs
                                                        • GitHub - ComfyUI-Workflow/awesome-comfyui: A collection of awesome custom nodes for ComfyUI

                                                          ComfyUI-Gemini_Flash_2.0_Exp (⭐+172): A ComfyUI custom node that integrates Google's Gemini Flash 2.0 Experimental model, enabling multimodal analysis of text, images, video frames, and audio directly within ComfyUI workflows. ComfyUI-ACE_Plus (⭐+115): Custom nodes for various visual generation and editing tasks using ACE_Plus FFT Model. ComfyUI-Manager (⭐+113): ComfyUI-Manager itself is also a cu

                                                            GitHub - ComfyUI-Workflow/awesome-comfyui: A collection of awesome custom nodes for ComfyUI
                                                          • 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

                                                            • Improving Diffusers Package for High-Quality Image Generation | Towards Data Science

                                                              Overcoming token size limitations, custom model loading, LoRa support, textual inversion support, and more Stable Diffusion WebUI from AUTOMATIC1111 has proven to be a powerful tool for generating high-quality images using the Diffusion model. However, while the WebUI is easy to use, data scientists, machine learning engineers, and researchers often require more control over the image generation p

                                                                Improving Diffusers Package for High-Quality Image Generation | Towards Data Science
                                                              • Hay - Custom Languages for Unix Systems

                                                                Example Hay could be used to configure a hypothetical Linux package manager: # cpython.hay -- A package definition hay define Package/TASK # define a tree of Hay node types Package cpython { # a node with attributes, and children version = '3.9' url = 'https://python.org' TASK build { # a child node, with Oil code ./configure make } } This program evaluates to a JSON tree, which you can consume fr

                                                                • はじめての自然言語処理 MixCSE による教師なし文章ベクトル生成 | オブジェクトの広場

                                                                  今回は教師なしの文章ベクトル化手法である MixCSE の検証です。教師なし学習ですから教師ありの手法よりは精度的に不利でしょうが、局面によっては役に立つケースもあるのでは?と試してみることに。公開されているコードは transformers ベースなのですが、今回は Colab の TPU で動かしてみたので、その方法も紹介しますね。 1. はじめに 今回は教師なしの文章ベクトル化手法である MixCSE1 の検証をしてみました。 本連載では文章ベクトル化のモデルとして、 Sentence BERT を取り上げたこと(第9回, 第18回)がありますが、品質の良いベクトルを生成する為には大量かつ良質の教師データが必要でした。 法律や特許のような特定領域に特化した文章を扱う局面では、対象領域の文書で学習したモデルを使いたいところですが、特定領域限定の都合良いデータはなかなか手に入りません。そ

                                                                    はじめての自然言語処理 MixCSE による教師なし文章ベクトル生成 | オブジェクトの広場
                                                                  1