並び順

ブックマーク数

期間指定

  • から
  • まで

1 - 40 件 / 117件

新着順 人気順

python for i in range len exampleの検索結果1 - 40 件 / 117件

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

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

      関数名、メソッド名、変数名でよく使う英単語のまとめ
    • 【2020年】CTF Web問題の攻撃手法まとめ - こんとろーるしーこんとろーるぶい

      はじめに 対象イベント 読み方、使い方 Remote Code Execution(RCE) 親ディレクトリ指定によるopen_basedirのバイパス PHP-FPMのTCPソケット接続によるopen_basedirとdisable_functionsのバイパス JavaのRuntime.execでシェルを実行 Cross-Site Scripting(XSS) nginx環境でHTTPステータスコードが操作できる場合にCSPヘッダーを無効化 GoogleのClosureLibraryサニタイザーのXSS脆弱性 WebのProxy機能を介したService Workerの登録 括弧を使わないXSS /記号を使用せずに遷移先URLを指定 SOME(Same Origin Method Execution)を利用してdocument.writeを順次実行 SQL Injection MySQ

        【2020年】CTF Web問題の攻撃手法まとめ - こんとろーるしーこんとろーるぶい
      • DNSpooqの脆弱性詳細と攻撃コード解説 - knqyf263's blog

        概要 要約 詳細 背景 前提 インターネット上に公開されたdnsmasq LAN内のマシンが攻撃者の支配下にある LAN内のマシンに攻撃者管理のWebサイトを閲覧させることができる 影響 中間者攻撃 汚染拡大 DDoS/Reverse DDoS CVE-2020-25684: ポートの多重化 CVE-2020-25685: 脆弱なCRC32の利用 CVE-2020-25686: 同一ドメイン名に対する複数クエリ発行 DNSフォワーダにおけるレスポンスの未検証 組み合わせる ドメイン名の登録 ソースIPアドレスの偽装 CRC32の衝突 攻撃の流れ ブラウザからの攻撃 検証端末 攻撃の成功確率 PoC fowarder cache attacker 大量クエリの送信 偽装レスポンスの送信 高速化の話 実行 対策・緩和策 余談 まとめ 概要 先日DNSpooqという脆弱性が公開されました。 ww

          DNSpooqの脆弱性詳細と攻撃コード解説 - knqyf263's blog
        • 「Postgres で試した?」と聞き返せるようになるまでもしくはなぜ私は雰囲気で技術を語るのか? — Just use Postgres 読書感想文 - じゃあ、おうちで学べる

          はじめに 「Just use Postgres」という言葉を初めて聞いたのは、いつだったか覚えていません。Twitter か Hacker News か、あるいは社内の Slack か。どこで聞いたにせよ、私の反応は決まっていました。「また極端なことを言う人がいる」と。 「それ、〇〇でもできますよ」——この手のフレーズはもう100回は聞いてきました。そして大抵の場合、その〇〇は専用ツールに置き換えられていきます。技術が専門分化していくのは自然な流れです。 全文検索なら Elasticsearch。時系列データなら InfluxDB。メッセージキューなら RabbitMQ。それぞれの分野に専門家がいて、専用のソリューションがあって、ベストプラクティスがあります。「とりあえず Postgres で」なんて、それは思考停止ではないか、と。でも、心のどこかで気になっていたんです。 www.mann

            「Postgres で試した?」と聞き返せるようになるまでもしくはなぜ私は雰囲気で技術を語るのか? — Just use Postgres 読書感想文 - じゃあ、おうちで学べる
          • KeyTrap (CVE-2023-50387)を検証してみた - knqyf263's blog

            DNSは趣味でやっているだけですし有識者のレビューを経ているわけでもないので誤りを含むかもしれませんが、DNS界隈には優しい人しかいないのできっと丁寧に指摘してくれるはずです。 追記:めちゃくちゃ丁寧にレビューしていただいたので修正いたしました。森下さんほどの方に細かく見ていただいて恐れ多いです...(学生時代に某幅広合宿で森下さんの発表を見てDNSセキュリティに興味を持った) 4万文字を超える大作、おつかれさまです。わかりやすく書けていると思いました。 ざっと読んで、コメントしてみました。ご参考まで。https://t.co/bVj5WeFHQr https://t.co/ku5NOx6ua8— Yasuhiro Morishita (@OrangeMorishita) 2024年2月19日 要約 背景 詳細 DNSSECとは? DNSSECの可用性 鍵タグの衝突 攻撃内容 SigJam

              KeyTrap (CVE-2023-50387)を検証してみた - knqyf263's blog
            • 大実験!ChatGPTは競プロの問題を解けるのか (2024年5月版) - E869120's Blog

              1. はじめに 2024 年 5 月 14 日、OpenAI 社から新たな生成 AI「GPT-4o」が発表され、世界に大きな衝撃を与えました。これまでの GPT-4 よりも性能を向上させただけでなく1、音声や画像のリアルタイム処理も実現し、さらに応答速度が大幅に速くなりました。「ついにシンギュラリティが来てしまったか」「まるで SF の世界を生きているような感覚だ」という感想も見受けられました。 しかし、いくら生成 AI とはいえ、競技プログラミングの問題を解くのは非常に難しいです。なぜなら競技プログラミングでは、問題文を理解する能力、プログラムを実装する能力だけでなく、より速く答えを求められる解法 (アルゴリズム) を考える能力も要求されるからです。もし ChatGPT が競技プログラミングを出来るようになれば他のあらゆるタスクをこなせるだろう、と考える人もいます。 それでは、現代最強の

                大実験!ChatGPTは競プロの問題を解けるのか (2024年5月版) - E869120's Blog
              • PerlからGoへのシステム移行のアシスト 〜Perl XSとUnix Domain Socketを活用〜 - Mirrativ Tech Blog

                こんにちは ハタ です。 Mirrativ では 2020年頃から サーバサイドの技術をPerlからGoへのシステム移行 を行っており、2024年現在でもサグラダファミリアのように移行作業は継続しています PerlとGoという2つの環境を同時に運用していますが、 基本的には 新機能は Go で実装 し、 Perlでは積極的に新規実装を行わない というスタイルで進めていました しかし、既存の機能の一部に手を加えたいとなった場合、まだまだ Perl の実装に手を加えることが一定あり、Perl から Go の機能を呼び出したいというニーズが出てきました (配信やギフトといったビジネスの根幹を支えるレガシーな実装においては顕著) そこで PerlXS を利用することで Perl から Go を直接呼び出せるようにできないかと考え検証を進めることにしました Goの -buildmode=c-shar

                  PerlからGoへのシステム移行のアシスト 〜Perl XSとUnix Domain Socketを活用〜 - Mirrativ Tech Blog
                • PythonのGILと3.13の実験的な新機能「free threading」を知る | gihyo.jp

                  福田(@JunyaFff)です。今月の「Python Monthly Topics」は、Python 3.13の新機能「free threading」について解説します。 はじめに 2024年10月にリリースされたPython 3.13。その中でもっとも注目すべき実験的な新機能の「free threading」について紹介します。本記事ではfree threadingについて紹介するにあたり、避けては通れない「Global Interpreter Lock(以下GIL⁠)⁠」というCPythonのロック機構の基本を説明して、free threadingについての概要と動作検証した結果を紹介します。 Python 3.13での他の新機能については先月の記事「Python 3.13で更新された機能の紹介」をご参照ください。 なお、今回の記事を書くにあたり参考にしたドキュメントは下記になります。

                    PythonのGILと3.13の実験的な新機能「free threading」を知る | gihyo.jp
                  • SaaS におけるテナントリソースへのリクエストルーティングを JWT を用いて実現する | Amazon Web Services

                    Amazon Web Services ブログ SaaS におけるテナントリソースへのリクエストルーティングを JWT を用いて実現する みなさんこんにちは。ソリューションアーキテクトの福本です。 本投稿のテーマは Software as a Service(SaaS)におけるルーティングです。 SaaS ではテナントごとにサーバーなどのリソースが分離されていることがあります。そのため、各テナントに属するユーザーからのリクエストを適切なリソースへとルーティングする必要があります。 具体的なルーティングの話に入る前に、SaaS のテナント分離モデルについて説明をします。SaaS では、テナントの分離モデルとしてサイロ、プール、ブリッジモデルが存在します。また、ユーザーがサブスクライブしている利用プラン (ティア) によって、リソースの分離形態が変わるような、階層ベースの分離もあります。 サイ

                      SaaS におけるテナントリソースへのリクエストルーティングを JWT を用いて実現する | Amazon Web Services
                    • MCP Python SDK のドキュメント|npaka

                      以下の記事が面白かったので、簡単にまとめました。 ・modelcontextprotocol/python-sdk 1. 概要「MCP」を使用すると、アプリケーションは標準化された方法でLLMにコンテキストを提供できます。これにより、コンテキストの提供とLLMとの実際のやり取りを分離できます。「Python SDK」はMCP仕様を完全に実装しており、以下のことが容易になります。 ・任意のMCPサーバに接続できるMCPクライアントの構築 ・リソース、プロンプト、ツールを公開するMCPサーバの作成 ・stdio、SSE、Streamable HTTPなどの標準トランスポートの使用 ・すべてのMCPプロトコルメッセージとライフサイクルイベントの処理 2. インストール2-1. PythonプロジェクトにMCPを追加Pythonプロジェクトの管理には「uv」が推奨されています。 (1) プロジェク

                        MCP Python SDK のドキュメント|npaka
                      • 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

                        • copilot-explorer

                          Copilot Internals | thakkarparth007.github.io Github Copilot has been incredibly useful to me. It can often magically read my mind and make useful suggestions. The thing that surprised me the most was its ability to correctly “guess” functions/variables from surrounding code – including from other files. This can only happen, if the copilot extension sends valuable information from surrounding cod

                          • Python: Streamlit を使って手早く WebUI 付きのプロトタイプを作る - CUBE SUGAR CONTAINER

                            Streamlit は、ざっくり言うと主にデータサイエンス領域において WebUI 付きのアプリケーションを手早く作るためのソフトウェア。 使い所としては、ひとまず動くものを見せたかったり、少人数で試しに使うレベルのプロトタイプを作るフェーズに適していると思う。 たとえば、Jupyter で提供すると複数人で使うのに難があるし、かといって Flask や Django を使って真面目に作るほどではない、くらいのとき。 使った環境は次のとおり。 $ sw_vers ProductName: macOS ProductVersion: 11.3.1 BuildVersion: 20E241 $ python -V Python 3.8.9 もくじ もくじ 下準備 基本的な使い方 基本的な書式 プレースホルダー プログレスバーを使った処理の進捗の可視化 基本的な可視化 組み込みのグラフ描画機能

                              Python: Streamlit を使って手早く WebUI 付きのプロトタイプを作る - CUBE SUGAR CONTAINER
                            • 📖 vLLMのコードを読んでみよう - ENGINEERING BLOG ドコモ開発者ブログ

                              こんにちは、NTTドコモR&D戦略部の門間です。 この記事では、vLLMのコードを追いつつその中身の動きに迫りたいと思います。 最近、業務やプライベートでLLM関連のいろいろを触っていますが、 OSSのコードリーディングを通じてLLMの推論処理への理解を深めたいというモチベーションです。 🤖 vLLMって? 📚 前提知識 Attention Is All You Need Paged Attention Continuous Batching 📦 vLLMの開発用インストール (Pythonコード開発のみ) Wheelのインストール リポジトリのクローン 起動確認 Pythonコードの改変 デバッガを使ったOSSのコードリーディングのススメ 🧩 vLLMのソフトウェアアーキテクチャ オンライン推論 : FastAPIサーバの立ち上げとEngineClientの生成 1. Engin

                                📖 vLLMのコードを読んでみよう - ENGINEERING BLOG ドコモ開発者ブログ
                              • 分散密ベクトル探索エンジンValdとSentence-BERTを使った類似文書検索を試す - エムスリーテックブログ

                                エムスリーエンジニアリンググループ AI・機械学習チームでソフトウェアエンジニアをしている中村(@po3rin) です。 好きな言語はGo。仕事では主に検索周りを担当しています。 Overview 最近、社内で情報検索論文輪読会を立ち上げました。 情報検索論文読み会のスケジュール そこでNGT-ONNGについての論文*1を紹介したところ1時間の予定のところを盛り上がりすぎて2時間超えてしまいました。 大盛り上がりのついでに、今回は情報検索論文輪読会で紹介した近似最近傍探索ライブラリNGTを内部で利用するValdを使って、類似文書検索がどのように出来るのか、現状の問題を解決できるのかを試したのでその結果を報告します。 Overview 弊社が抱える類似文書検索の課題 Sentence-BERT Valdを使った近似最近傍探索 NGT Vald Vald×Sententce-BERTで類似文書

                                  分散密ベクトル探索エンジンValdとSentence-BERTを使った類似文書検索を試す - エムスリーテックブログ
                                • 缶つぶし機とソフトウェア移行技術 - Refactoring to Rust の読書感想文 - じゃあ、おうちで学べる

                                  はじめに ——あるいは、「知っている」と「理解している」の間 Rustのことは、知っていた。学習もしていた。実務でも使っていた。 でも、それは知っているつもりだった。 知ってるつもり 無知の科学 (ハヤカワ文庫NF) 作者:スティーブン スローマン,フィリップ ファーンバック早川書房Amazon 日々Rustで開発し、BoxとRcとArcを使い分け、tokio::spawnでタスクを生成し、?演算子を当たり前のように書いている。FFI?PyO3使えばいいでしょ。WebAssembly?wasm-bindgenがあるじゃない。技術的には、確かに「使える」レベルにはあった。 でも、心のどこかで感じていた違和感があった。 オートバイのエンジンを分解できる人と、エンジンが動く原理を理解している人は違う。コードが動くことと、なぜそう書くべきかを理解することも違う。私は前者だった。メカニックではあった

                                    缶つぶし機とソフトウェア移行技術 - Refactoring to Rust の読書感想文 - じゃあ、おうちで学べる
                                  • Changing std::sort at Google’s Scale and Beyond

                                    TL;DR; We are changing std::sort in LLVM’s libcxx. That’s a long story of what it took us to get there and all possible consequences, bugs you might encounter with examples from open source. We provide some benchmarks, perspective, why we did this in the first place and what it cost us with exciting ideas from Hyrum’s Law to reinforcement learning. All changes went into open source and thus I can

                                      Changing std::sort at Google’s Scale and Beyond
                                    • Optimizing your LLM in production

                                      Note: This blog post is also available as a documentation page on Transformers. Large Language Models (LLMs) such as GPT3/4, Falcon, and LLama are rapidly advancing in their ability to tackle human-centric tasks, establishing themselves as essential tools in modern knowledge-based industries. Deploying these models in real-world tasks remains challenging, however: To exhibit near-human text unders

                                        Optimizing your LLM in production
                                      • Transformers高速化ライブラリvLLMのAsyncLLMEngineを利用した非同期高速文章生成 - 端の知識の備忘録

                                        概要 先日までKaggleのAIMOコンペ(数学の問題をLLMに解かせて正答率を競う)に参戦していました。結果は初のチーム参加でメンバーに助けられつつ運もあり、なんとか銀メダルを取れました!これでMasterにリーチがかかりましたが、金メダルは未だ取れる気がしないので遠い道のりです……。 www.kaggle.com このコンペについて、近い内に同様のコンペが開催予定なこともあり上位解法があまり出ていない状態なので、どのような手法が良かったのかまだわかっていないのですが、とりあえず公開されている情報を元にすると、 LLMとしてはほぼほぼ全員が数学問題に特化したLLMであるDeepseek-Math-7Bを利用している LLMが出力したPythonコードを実行するインタープリターを実装することで、LLMのハルシネーションによる計算ミスを防ぐパイプラインが有力であった LLMの出力を比較的高い

                                          Transformers高速化ライブラリvLLMのAsyncLLMEngineを利用した非同期高速文章生成 - 端の知識の備忘録
                                        • optunaの理論 - tomtom58’s blog

                                          はじめに 従来のフレームワークにおける課題 Optunaの設計思想 optunaの理論 Define-by-run APIの理論と実装 サンプリングアルゴリズムの理論 効率的な枝刈り(Pruning)メカニズム 分散最適化の理論とアーキテクチャ ストレージバックエンド トライアルの同期と非同期実行 実際のユースケースと性能評価 ベンチマーク評価の理論的枠組み TPEとCMA-ESの組み合わせによる性能向上 実世界での応用例 システムの拡張性と実装の詳細 カスタムサンプラーの実装 カスタム枝刈り手法の実装 実装上の最適化とパフォーマンスチューニング データベースアクセスの最適化 メモリ使用量の最適化 並列処理の効率化 ハイパーパラメータ探索の最適化 実践的な使用方法とベストプラクティス 探索空間の設計 目的関数の設計 計算リソースの最適配分 実装例 高度な機能とカスタマイズ マルチ目的最適化

                                            optunaの理論 - tomtom58’s blog
                                          • Amazon CodeWhispererを使ったプロンプトエンジニアリングのベストプラクティス | Amazon Web Services

                                            Amazon Web Services ブログ Amazon CodeWhispererを使ったプロンプトエンジニアリングのベストプラクティス 生成 AI コーディングツールは、開発者の日々の開発作業の仕方を変えています。関数の生成からユニットテストの作成まで、これらのツールはお客様のソフトウェア開発の加速に役立っています。 Amazon CodeWhisperer は、開発者の自然言語のコメントと周囲のコードに基づいてコードのレコメンデーションを提供することで、開発者の生産性を向上させる IDE とコマンドラインの AI による生産性向上ツールです。 CodeWhisperer を使用すると、開発者は「 S3 にファイルをアップロードする Lambda 関数を作成する」など、特定のタスクを簡単な英語で概説するコメントを単純に記述することができます。 CodeWhisperer に対してこ

                                              Amazon CodeWhispererを使ったプロンプトエンジニアリングのベストプラクティス | Amazon Web Services
                                            • Golang Mini Reference 2022: A Quick Guide to the Modern Go Programming Language (REVIEW COPY)

                                              Golang Mini Reference 2022 A Quick Guide to the Modern Go Programming Language (REVIEW COPY) Harry Yoon Version 0.9.0, 2022-08-24 REVIEW COPY This is review copy, not to be shared or distributed to others. Please forward any feedback or comments to the author. • feedback@codingbookspress.com The book is tentatively scheduled to be published on September 14th, 2022. We hope that when the release da

                                              • Node.js

                                                Notable Changes Deprecations and Removals (SEMVER-MAJOR) fs: remove permissive rmdir recursive (Antoine du Hamel) #37216 (SEMVER-MAJOR) fs: runtime deprecate rmdir recursive option (Antoine du Hamel) #37302 (SEMVER-MAJOR) lib: runtime deprecate access to process.binding('http_parser') (James M Snell) #37813 (SEMVER-MAJOR) lib: runtime deprecate access to process.binding('url') (James M Snell) #377

                                                  Node.js
                                                • A Walk with LuaJIT

                                                  The following is a chronicle of implementing a general purpose zero-instrumentation BPF based profiler for LuaJIT. Some assumptions are made about what this entails and it may be helpful to read some of our other work in this area. One major change from prior efforts is that instead of working with the original Parca unwinder we are now working with the OpenTelemetry eBPF profiler. If you missed t

                                                    A Walk with LuaJIT
                                                  • The Absolute Minimum Every Software Developer Must Know About Unicode in 2023 (Still No Excuses!) @ tonsky.me

                                                    If you combine this with the Unicode table, you’ll see that English is encoded with 1 byte, Cyrillic, Latin European languages, Hebrew and Arabic need 2, and Chinese, Japanese, Korean, other Asian languages, and Emoji need 3 or 4. A few important points here: First, UTF-8 is byte-compatible with ASCII. The code points 0..127, the former ASCII, are encoded with one byte, and it’s the same exact byt

                                                      The Absolute Minimum Every Software Developer Must Know About Unicode in 2023 (Still No Excuses!) @ tonsky.me
                                                    • はじめての自然言語処理 Fusion-In-Decoder でクイズに答えるモデルを作る | オブジェクトの広場

                                                      今回は Fusion-In-Decoder を使ってクイズに答えるモデルを作ります。以前から Wikipedia 等の外部情報を参照できるテキスト生成モデルを試してみたいと思っていました。Fusion-In-Decoder の発表は 2020 年なので少し前のモデルですが、T5 ベースで手軽に試せるサイズ感ですので、日本語で試してみましょう。 1. はじめに 今回紹介する Fusion-In-Decoder(以下、FiD )1 は Meta AI (当時は Facebook AI Research) が発表した Open Domain question Answering タスクを解くテキスト生成モデルです。 じつは、以前から外部情報を参照できるテキスト生成モデルを試してみたくて2、 Google の RETRO3 の論文を読んでたんです。 なのですが、外部情報のサイズ感が 1000 B

                                                        はじめての自然言語処理 Fusion-In-Decoder でクイズに答えるモデルを作る | オブジェクトの広場
                                                      • Edge AI Just Got Faster

                                                        When Meta released LLaMA back in February, many of us were excited to see a high-quality Large Language Model (LLM) become available for public access. Many of us who signed up however, had difficulties getting LLaMA to run on our edge and personal computer devices. One month ago, Georgi Gerganov started the llama.cpp project to provide a solution to this, and since then his project has been one o

                                                          Edge AI Just Got Faster
                                                        • 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

                                                          • Zig in 30 minutes

                                                            test.md A half-hour to learn Zig This is inspired by https://fasterthanli.me/blog/2020/a-half-hour-to-learn-rust/ Basics the command zig run my_code.zig will compile and immediately run your Zig program. Each of these cells contains a zig program that you can try to run (some of them contain compile-time errors that you can comment out to play with) You'll want to declare a main() function to get

                                                              Zig in 30 minutes
                                                            • Why People are Angry over Go 1.23 Iterators - gingerBill

                                                              NOTE: This is based on, but completely rewritten, from a Twitter post: https://x.com/TheGingerBill/status/1802645945642799423 TL;DR It makes Go feel too “functional” rather than being an unabashed imperative language. I recently saw a post on Twitter showing the upcoming Go iterator design for Go 1.23 (August 2024). From what I can gather, many people seem to dislike the design. I wanted to give m

                                                              • How a simple Linux kernel memory corruption bug can lead to complete system compromise

                                                                In this case, reallocating the object as one of those three types didn't seem to me like a nice way forward (although it should be possible to exploit this somehow with some effort, e.g. by using count.counter to corrupt the buf field of seq_file). Also, some systems might be using the slab_nomerge kernel command line flag, which disables this merging behavior. Another approach that I didn't look

                                                                • So You Want To Remove The GVL?

                                                                  I want to write a post about Pitchfork, explaining where it comes from, why it is like it is, and how I see its future. But before I can get to that, I think I need to share my mental model on a few things, in this case, Ruby’s GVL. For quite a long time, it has been said that Rails applications are mostly IO-bound, hence Ruby’s GVL isn’t that big of a deal and that has influenced the design of so

                                                                  • LangChainについて解説。大規模言語モデル(LLM)を効率よく実装するためのフレームワーク - G-gen Tech Blog

                                                                    G-gen 又吉です。LangChain とは、大規模言語モデル (LLM) を効率よく実装するために使用するフレームワークです。 当記事では LangChain を用いて、Google Cloud (旧称 : GCP) の LLM である PaLM 2 を操作する基本的な方法をご紹介します。 はじめに Vertex AI PaLM API LLM 開発の課題 学習コスト 入力トークン制限 事実と異なる回答 最新情報に対応していない 準備 環境構築 ライブラリの準備 ユーティリティ関数を定義 各 AI モデルを初期化 LangChain とは 概要 Models 概要 LLMs Chat model Text Embedding Model Memory 概要 ConversationBufferMemory Prompts 概要 Prompt Template Output Parser

                                                                      LangChainについて解説。大規模言語モデル(LLM)を効率よく実装するためのフレームワーク - G-gen Tech Blog
                                                                    • Amazon Bedrock now provides access to Meta’s Llama 2 Chat 13B model | Amazon Web Services

                                                                      AWS News Blog Amazon Bedrock now provides access to Meta’s Llama 2 Chat 13B model Update: November 29, 2023 — Today, we’re adding the Llama 2 70B model in Amazon Bedrock, in addition to the already available Llama 2 13B model. As its name implies, the Llama 2 70B model has been trained on larger datasets than the Llama 2 13B model. If you’re wondering when to use which model, consider using Llama

                                                                        Amazon Bedrock now provides access to Meta’s Llama 2 Chat 13B model | Amazon Web Services
                                                                      • ​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
                                                                        • はじめての自然言語処理 Hugging Face Transformers で T5 を使ってみる | オブジェクトの広場

                                                                          前回が分量的にやたらと重かったので、今回はその反省(反動?)を踏まえて軽い感じでいってみます。第7回で紹介した T5 ですが Hugging Face の Transformers でもサポートされてますので、その使用方法をご紹介したいと思います。 1. はじめに 今回は久しぶりに T5 の話です。T5 に関しては第7回、第8回で一度紹介しているので、未読の方は記事に目を通してから戻ってきて頂けると、より理解がしやすいと思います。 さて、 T5 ですが Google のオリジナルコード(以下 “t5"と記述)1は敷居が高いと感じる方もいらっしゃるのではないでしょうか。 Estimator API ベースのコードや gin による設定など慣れていないと、とっつきにくいのではないかと思います。 そこで今回は Hugging Face の Transformers 2を使って T5 を動かす方法

                                                                            はじめての自然言語処理 Hugging Face Transformers で T5 を使ってみる | オブジェクトの広場
                                                                          • Apple Silicon M1 は自然言語処理も、ちょっと速いよ - Qiita

                                                                            # コードの大部分は以下のチュートリアルによる。 # https://www.tensorflow.org/tutorials/text/nmt_with_attention?hl=ja # 元のコンテンツは Creative Commons Attribution 4.0 License の下で公開されている。 import io import os import re import time import unicodedata import tensorflow as tf path_to_zip = tf.keras.utils.get_file( 'spa-eng.zip', origin='http://storage.googleapis.com/download.tensorflow.org/data/spa-eng.zip', extract=True) path_to_

                                                                              Apple Silicon M1 は自然言語処理も、ちょっと速いよ - Qiita
                                                                            • 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

                                                                              • Bucket full of secrets – Terraform exfiltration | Mercari Engineering

                                                                                Background At Mercari, we utilize many microservices developed across multiple different teams. Each team has ownership over not only their code, but also the infrastructure necessary to run their services. To allow developers to take ownership of their infrastructure we use HashiCorp Terraform to define the infrastructure as code. Developers can use Terraform native resources or custom modules pr

                                                                                  Bucket full of secrets – Terraform exfiltration | Mercari Engineering
                                                                                • Accelerate Python code 100x by import taichi as ti | Taichi Docs

                                                                                  Python has become the most popular language in many rapidly evolving sectors, such as deep learning and data sciences. Yet its easy readability comes at the cost of performance. Of course, we all complain about program performance from time to time, and Python should certainly not take all the blame. Still, it's fair to say that Python's nature as an interpreted language does not help, especially