並び順

ブックマーク数

期間指定

  • から
  • まで

1 - 22 件 / 22件

新着順 人気順

python generator yield noneの検索結果1 - 22 件 / 22件

  • Youtubeは無限のクラウドストレージ - Qiita

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

      Youtubeは無限のクラウドストレージ - Qiita
    • LLMフレームワークのセキュリティリスク - LangChain, Haystack, LlamaIndex等の脆弱性事例に学ぶ - GMO Flatt Security Blog

      はじめに こんにちは。GMO Flatt Security株式会社セキュリティエンジニアの森(@ei01241)です。 近年、大規模言語モデル(LLM)の進化により、チャットボット、データ分析・要約、自律型エージェントなど、多岐にわたるAIアプリケーション開発が進んでいます。LangChainやLlamaIndexのようなLLMフレームワークは、LLM連携や外部データ接続などを抽象化し開発効率を向上させる一方、その利便性の背後には新たなセキュリティリスクも存在します。 本稿では、LLMフレームワークを利用・開発する際に発生しやすい脆弱性を具体的なCVEを交えて解説し、それぞれ脆弱性から教訓を学びます。そして、それらの教訓から開発者が知っておくべき対策案についても紹介します。 また、GMO Flatt SecurityはLLMを活用したアプリケーションに対する脆弱性診断・ペネトレーションテス

        LLMフレームワークのセキュリティリスク - LangChain, Haystack, LlamaIndex等の脆弱性事例に学ぶ - GMO Flatt Security Blog
      • neue cc - Claudia - Anthropic ClaudeのC# SDKと現代的なC#によるウェブAPIクライアントの作り方

        AI関連、競合は現れども、性能的にやはりOpenAI一強なのかなぁというところに現れたAnthropic Claude 3は、確かに明らかに性能がいい、GPT-4を凌駕している……!というわけで大いに気に入った(ついでに最近のOpenAIのムーブが気に入らない)ので、C#で使い倒していきたい!そこで、まずはSDKがないので非公式SDKを作りました。こないだまでプレビュー版を流していたのですが、今回v1.0.0として出します。ライブラリ名は、Claudeだから、Claudiaです!.NET全般で使えるのと、Unity(Runtime/Editor双方)でも動作確認をしているので、アイディア次第で色々活用できると思います。 GitHub - Cysharp/Claudia 今回のSDKを作るにあたっての設計指針の一番目は、公式のPython SDKやTypeScript SDKと限りなく似せる

        • pytest でテストケース毎に DB を自動的に初期化して、テスト開発体験を向上させる - SalesNow Tech Blog

          概要 Web バックエンドのテストコードを書く場合、その多くは DB に依存していることが多いです。 DB 関連のテストは、テストデータの準備やテストケース毎の DB 処理化を適切に行うことが重要ですが、手間がかかる場合あるため、Mock で擬似的にテストしてしまうことも多いかと思います。 ただ、Mock を使ったテストは本質的な問題を検知できない意味のないテストになってしまう可能性があり、可能な限り DB の Mock を行わずに、実際の DB を使用してテストすることが望ましいと考えています。 本記事では、pytest、sqlalchemy、PostgreSQL を使った場合に、テストケース毎に DB を簡単に初期化しつつ、テストケース毎の前提データ登録も簡単うことでテスト開発体験を向上させる方法を紹介します。 前提環境 本記事では、以下の環境を前提として説明いたします。 python

            pytest でテストケース毎に DB を自動的に初期化して、テスト開発体験を向上させる - SalesNow Tech Blog
          • research!rsc: Coroutines for Go

            This post is about why we need a coroutine package for Go, and what it would look like. But first, what are coroutines? Every programmer today is familiar with function calls (subroutines): F calls G, which stops F and runs G. G does its work, potentially calling and waiting for other functions, and eventually returns. When G returns, G is gone and F continues running. In this pattern, only one fu

            • 【全2回】AWS Lambda x FastAPIによるPythonモダンAPI開発のすゝめ 2 - RAKSUL TechBlog

              はじめに 対象読者 あまり説明しないこと 前提とするバージョン 参考となるレポジトリ 3. アーキテキチャ及びディレクトリ構造 オニオンアーキテクチャを採用 オニオンアーキテクチャとは 誕生の背景 依存関係逆転の原則の活用 採用理由 参考になった記事 ディレクトリ構造 全体の構成 api schema apiとusecaseの間のデータ構造を提供する役割 schemaはパスオペレーション関数のリクエストとレスポンスの構造を提供する役割 usecase domain infrastructure core container_config exception 参考にしたもの まとめ はじめに ラクスルグループのノバセルで新卒2年目のエンジニアをしています田村(tamtam)です。 第1回では、AWS Lambda x FastAPIによるPythonモダンAPI開発を実現する上で役立つであろ

                【全2回】AWS Lambda x FastAPIによるPythonモダンAPI開発のすゝめ 2 - RAKSUL TechBlog
              • 【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
                • ChatGPT風の画面を表示できるChatbot UIをFastAPIで作成した自作LangChainサーバに接続させる方法|mah_lab / 西見 公宏

                  ChatGPT風の画面を表示するOSSがいくつか出てきている中で、コードの読みやすさと操作性を比較した上でオススメしたいのが、Next.jsで書かれているChatbot UIというOSSだ。 ローカルでサクッと起動ができ、立ち上がるとこんな画面が表示される。 ChatGPTの画面とうり二つOpenAIのAPI Keyを入力すれば簡単にOpenAIのチャットモデルと接続される。API接続のChatGPTなので、本家のChatGPTよりはやりとりできる文字量が制限されるものの、本家のChatGPTではセンシティブな情報を扱うことができないため、API接続のUIにも価値はある。 ところでこのChatbot UI、ソースコードを読んでみると環境変数でAPI接続先を差し替えることができるようになっている。process.env.OPENAI_API_HOSTの部分だ。 utils/app/const

                    ChatGPT風の画面を表示できるChatbot UIをFastAPIで作成した自作LangChainサーバに接続させる方法|mah_lab / 西見 公宏
                  • 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
                    • 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
                      • Argilla を使って生成 AI の出力クオリティ向上を目指す! - Techtouch Developers Blog

                        はじめに 導入背景 Argilla とは なぜ Argilla を選んだか 実現したいこと 設計 実装方針 その他実装における工夫点 今後の課題 まとめ はじめに こんにちは。データエンジニアの acchan です。 現在 DAP Lab とよばれるチームに配属しており、生成 AI 技術を使ったプロダクト開発に従事しています。生成 AI の新たな可能性と課題に挑む私たちの取り組みについて、今回は AI 出力改善のワークフロー構築に Argilla と呼ばれるツールを組み込んだ背景や、具体的な機能などについて紹介します。 導入背景 弊社はノーコードWebシステム改善プラットフォーム「テックタッチ」を展開しています。 この「テックタッチ」に対して、DAP Labでは生成 AI を使った機能(以下、AI 機能)のリリースを控えています。 この機能は「テックタッチ」の利用効率化を目的としたものです

                          Argilla を使って生成 AI の出力クオリティ向上を目指す! - Techtouch Developers Blog
                        • 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

                          • 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
                            • August 2021 (version 1.60)

                              Update 1.60.1: The update addresses these issues. Update 1.60.2: The update addresses these issues. Downloads: Windows: x64 Arm64 | Mac: Universal Intel silicon | Linux: deb rpm tarball Arm snap Welcome to the August 2021 release of Visual Studio Code. There are many updates in this version that we hope you will like, some of the key highlights include: Automatic language detection - Programming l

                                August 2021 (version 1.60)
                              • How Python Asyncio Works: Recreating it from Scratch

                                Right now, asyncio is one of the trendier topics in Python, and rightfully so – It’s a great way to handle I/O-bound programs! When I was learning about asyncio, It took me a while to understand how it actually worked. But later, I came to find out that it’s basically just a really nice layer on top of Python Generators. In this article, I’m going to create a simplified version of asyncio using ju

                                  How Python Asyncio Works: Recreating it from Scratch
                                • 生成AIアプリのクリーンアーキテクチャを考える - Insight Edge Tech Blog

                                  目次 はじめに クリーンアーキテクチャとは 例として考えるアプリケーション 生成AIアプリにおける難しさ 実際に作ってみる 実装を差し替えてみる まとめ はじめに こんにちは、InsightEdgeの開発チームに参画させていただいています伊藤です。 InsightEdgeでは現在、LLM/生成AIを用いたアプリ開発を多く手掛けています。 私もOpenAI等の生成AIを使ったアプリケーションの実装に関わることが増えてきており、 ある程度理解が進んできたところで、改めてアーキテクチャを洗練させたいと思うようになりました。 この記事では生成AIを組み込んだアプリを構築する際の、クリーンアーキテクチャを考えていきたいと思います。 クリーンアーキテクチャとは まずは、クリーンアーキテクチャについて軽く振り返りましょう。 クリーンアーキテクチャではソフトウェアの理解・開発・デプロイ・運用・保守を容易に

                                    生成AIアプリのクリーンアーキテクチャを考える - Insight Edge Tech Blog
                                  • sys.monitoring — Execution event monitoring

                                    Note sys.monitoring is a namespace within the sys module, not an independent module, so there is no need to import sys.monitoring, simply import sys and then use sys.monitoring. This namespace provides access to the functions and constants necessary to activate and control event monitoring. As programs execute, events occur that might be of interest to tools that monitor execution. The sys.monitor

                                      sys.monitoring — Execution event monitoring
                                    • 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,

                                      • Automated Hydroponic System Build – Projects | Kyle Gabriel

                                        Last Updated: August 28, 2022 Hydroponic farming is a method of growing crops without soil, with the main benefits of environmental and nutrient control, water conservation, and reduction of labor. This technique relies on a number of technologies that the principles of automation can be applied in order to improve yield and consistency. In this article and accompanying video, I’ll show you how to

                                        • 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】素数のリストを作成するアルゴリズム - 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
                                            • 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

                                              1