並び順

ブックマーク数

期間指定

  • から
  • まで

1 - 40 件 / 220件

新着順 人気順

python get index of value in setの検索結果1 - 40 件 / 220件

  • Command Line Interface Guidelines

    Contents Command Line Interface Guidelines An open-source guide to help you write better command-line programs, taking traditional UNIX principles and updating them for the modern day. Authors Aanand Prasad Engineer at Squarespace, co-creator of Docker Compose. @aanandprasad Ben Firshman Co-creator Replicate, co-creator of Docker Compose. @bfirsh Carl Tashian Offroad Engineer at Smallstep, first e

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

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

        関数名、メソッド名、変数名でよく使う英単語のまとめ
      • 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
        • Why, after 6 years, I’m over GraphQL

          GraphQL is an incredible piece of technology that has captured a lot of mindshare since I first started slinging it in production in 2018. You won’t have to look far back on this (rather inactive) blog to see I have previously championed this technology. After building many a React SPA on top of a hodge podge of untyped JSON REST APIs, I found GraphQL a breath of fresh air. I was truly a GraphQL h

          • 防衛省サイバーコンテスト 2025 writeup - st98 の日記帳 - コピー

            2/2に12時間というちょうどよい競技時間で開催された。21時終了だったけれども、11時45分ぐらいに最速で全完して1位🎉 第1回以来4年ぶりの優勝だ。昨年大会の第4回ではヒントの閲覧数で優勝を逃してしまって悔しい思いをしたので、雪辱を果たすことができ嬉しい。開始直後からずっと1位を独走できており、450名以上のプレイヤーがいる中で圧勝だったのも嬉しい。 昨年度や一昨年度はバルクが作問を担当していたが、今回はAGESTが担当していた。これまでの問題と比較すると全体的に易化したように思うが、解くにあたって発想の大きな飛躍を必要とするいわゆる「エスパー要素」のある問題はごく一部を除いて存在しておらず*1、よかったと思う。また、昨年度・一昨年度に引き続きwriteupは公開可能というのもよかった。 戦略というほどの戦略は立てていなかったけれども、とりあえずWebを見た後は全カテゴリを上から見て

              防衛省サイバーコンテスト 2025 writeup - st98 の日記帳 - コピー
            • OpenAIのBatch APIを使ってお得にプロンプトを一括処理してみる - Taste of Tech Topics

              はじめに こんにちは。データサイエンスチームYAMALEXのSsk1029Takashiです。 最近はOpenAIに日本支社が出来て、日本語対応が加速するというニュースにわくわくしています。 今回はそんなOpenAIから発表されたBatch APIという機能が便利、かつお得な機能だったのでどのように使えるのか試してみます。 Introducing the Batch API: save costs and get higher rate limits on async tasks (such as summarization, translation, and image classification). Just upload a file of bulk requests, receive results within 24 hours, and get 50% off API pri

                OpenAIのBatch APIを使ってお得にプロンプトを一括処理してみる - Taste of Tech Topics
              • Why UUIDs won't protect your secrets

                This post is part of a collection on UUIDs. What is IDOR? Indirect Object Reference (IDOR) occurs when a resource can be accessed directly by its ID even when the user does not have proper authorization to access it. IDOR is a common mistake when using a separate service for storing files, such as a publicly readable Amazon S3 bucket. The web application may perform access control checks correctly

                • REST API Design Best Practices Handbook – How to Build a REST API with JavaScript, Node.js, and Express.js

                  By Jean-Marc Möckel I've created and consumed many API's over the past few years. During that time, I've come across good and bad practices and have experienced nasty situations when consuming and building API's. But there also have been great moments. There are helpful articles online which present many best practices, but many of them lack some practicality in my opinion. Knowing the theory with

                    REST API Design Best Practices Handbook – How to Build a REST API with JavaScript, Node.js, and Express.js
                  • The Prompt Engineering Playbook for Programmers

                    Developers are increasingly relying on AI coding assistants to accelerate our daily workflows. These tools can autocomplete functions, suggest bug fixes, and even generate entire modules or MVPs. Yet, as many of us have learned, the quality of the AI’s output depends largely on the quality of the prompt you provide. In other words, prompt engineering has become an essential skill. A poorly phrased

                      The Prompt Engineering Playbook for Programmers
                    • GitHub - modelcontextprotocol/servers: Model Context Protocol Servers

                      Official integrations are maintained by companies building production ready MCP servers for their platforms. 21st.dev Magic - Create crafted UI components inspired by the best 21st.dev design engineers. ActionKit by Paragon - Connect to 130+ SaaS integrations (e.g. Slack, Salesforce, Gmail) with Paragon’s ActionKit API. Adfin - The only platform you need to get paid - all payments in one place, in

                        GitHub - modelcontextprotocol/servers: Model Context Protocol Servers
                      • 素人でも1ヶ月 Causal Impact で遊んだら、統計的有意差が見えるようになった話 - ブログ - 株式会社JADE

                        こんにちは。2024年5月にJADEに入社した江越です。 前職でデータ加工を生業としていた関係で、現在はデータ分析に関わるサポートをメインに取り組んでいます。……とはいえ、法学部出身ということもあり、統計やデータ分析に関しては「素人に毛が生えた程度」の知識しかありません。 今回は、そんな統計素人の私が Causal Impact という分析パッケージに1ヶ月間触れてみた結果、施策の効果を統計的かつ定量的に説明できる手段が得られた経験をシェアしたいと思います。 【もくじ】 Causal Impactとの出会い 効果検証について持っていた課題感 Causal Impact を知る前の効果検証手段 上記の説明の何が問題なのか? 実際に遊んでみる Causal Impactとは一体何者だ! 何をすれば良いか整理してみる inputとthroughを用意して実行してみる 統計的有意差が見える……見え

                          素人でも1ヶ月 Causal Impact で遊んだら、統計的有意差が見えるようになった話 - ブログ - 株式会社JADE
                        • 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
                          • NETGEAR社製ルーターにおける認証不要の任意コード実行の技術的解説(PSV-2022-0044) - GMO Flatt Security Blog

                            ※本記事は先立って公開された英語版記事を翻訳し、日本語圏の読者向けに一部改変したものです。 画像出典: https://www.netgear.com/business/wifi/access-points/wac124/ はじめに こんにちは、株式会社Flatt Securityのstypr(@stereotype32)です。 一昨年、日本のOSS製品で発見された0day脆弱性に関する技術解説をブログに書きました。 それ以来、私は様々な製品に多くの脆弱性を発見してきました。残念ながら私が見つけたバグのほとんどはすぐに修正されなかったので、今日まで私が見つけた、技術的に興味深い脆弱性の情報を共有する機会がありませんでした。 本記事では、NETGEAR社のWAC124(AC2000)ルーターにおいて、様々な脆弱性を発見し、いくつかの脆弱性を連鎖させて、前提条件なしに未認証ユーザーの立場からコ

                              NETGEAR社製ルーターにおける認証不要の任意コード実行の技術的解説(PSV-2022-0044) - GMO Flatt Security 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

                              • Writing a C compiler in 500 lines of Python

                                A few months ago, I set myself the challenge of writing a C compiler in 500 lines of Python1, after writing my SDF donut post. How hard could it be? The answer was, pretty hard, even when dropping quite a few features. But it was also pretty interesting, and the result is surprisingly functional and not too hard to understand! There's too much code for me to comprehensively cover in a single blog

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

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

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

                                    The article is also available in Chinese. Disclaimer: This post is a very long collection of thoughts and problems I've had over the years, and also addresses some of the arguments I've been repeatedly told. This post expresses my opinion the has been formed over using Rust for gamedev for many thousands of hours over many years, and multiple finished games. This isn't meant to brag or indicate su

                                    • WebAssembly: Docker without containers!

                                      This is a companion article to a talk about Docker+WebAssembly that we gave at "Docker Community All Hands 7, Winter Edition" on Dec 15th, 2022. Introduction Recently Docker announced support for WebAssembly in cooperation with WasmEdge. This article will explain what is WebAssembly, why it is relevant to the Docker ecosystem and provide some hands-on examples to try on. We assume you are familiar

                                        WebAssembly: Docker without containers!
                                      • Qlibを使った機械学習パイプライン環境の構築 投資の取引戦略最適化と機械学習モデル作成の省力化を目指して - 株のシステムトレードをしよう - 1から始める株自動取引システムの作り方

                                        概要 はじめに Qlibの試用 動作条件 使用したrequirements.txt データの取得 予測の実施 出力 図示 ソースコード バックテストでのポートフォリオ分析 リスク分析、分析モデル おわりに 概要 本記事では、Qlibを使用して、機械学習パイプライン環境を構築する第一歩について述べる。 はじめに このブログの趣旨としては、当初は「戦略作成」→「戦略検証」→「戦略稼働」→「成果の評価」→「戦略へフィードバック」といったサイクルを管理できるような自動トレーディングシステムを作ることを考えていた。 最近、すこし株取引から離れていたのだが、最近になってまたやり始めようかなと思い、色々と現在の状況を調べはじめた。 その中で、MicrosoftのリポジトリにQlibというものがあるのを見つけた。これが2020年の8月から作られたもので、現在でもメンテされており、もしかするとこれがやりたい

                                          Qlibを使った機械学習パイプライン環境の構築 投資の取引戦略最適化と機械学習モデル作成の省力化を目指して - 株のシステムトレードをしよう - 1から始める株自動取引システムの作り方
                                        • Spin 1.0 — The Developer Tool for Serverless WebAssembly

                                          We are delighted to introduce Spin 1.0, the first stable release of the open source developer tool for building serverless applications with WebAssembly (Wasm)! Since we first introduced Spin last year, we have been hard at work together with the community on building a frictionless developer experience for building and running serverless applications with Wasm. For this release, we focused on bui

                                            Spin 1.0 — The Developer Tool for Serverless WebAssembly
                                          • Incident Metrics in SRE

                                            Štěpán Davidovič Incident Metrics in SRE Critically Evaluating MTTR and Friends Boston Farnham Sebastopol Tokyo Beijing Boston Farnham Sebastopol Tokyo Beijing 978-1-098-10313-2 [LSI] Incident Metrics in SRE by Štěpán Davidovič Copyright © 2021 O’Reilly Media, Inc. All rights reserved. Printed in the United States of America. Published by O’Reilly Media, Inc., 1005 Gravenstein Highway North, Sebas

                                            • 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
                                              • Taming Go’s Memory Usage, or How We Avoided Rewriting Our Client in Rust — Akita Software

                                                Taming Go’s Memory Usage, or How We Avoided Rewriting Our Client in Rust A couple months ago, we faced a question many young startups face. Should we rewrite our system in Rust? At the time of the decision, we were a Go and Python shop. The tool we’re building passively watches API traffic to provide “one-click,” API-centric visibility, by analyzing the API traffic. Our users run an agent that sen

                                                  Taming Go’s Memory Usage, or How We Avoided Rewriting Our Client in Rust — Akita Software
                                                • 4 Pandas Anti-Patterns to Avoid and How to Fix Them

                                                  pandas is a powerful data analysis library with a rich API that offers multiple ways to perform any given data manipulation task. Some of these approaches are better than others, and pandas users often learn suboptimal coding practices that become their default workflows. This post highlights four common pandas anti-patterns and outlines a complementary set of techniques that you should use instea

                                                    4 Pandas Anti-Patterns to Avoid and How to Fix Them
                                                  • How to create a Python package in 2022

                                                    Photo by Claudio Schwarz on Unsplash. How to create a Python package? In order to create a Python package, you need to write the code that implements the functionality you want to put in your package, and then you need to publish it to PyPI. That is the bare minimum. Nowadays, you can also set up a variety of other things to make your life easier down the road: continuous testing of your package;

                                                      How to create a Python package in 2022
                                                    • 野球のビッグデータをGCPとPySparkでいい感じに使いやすくしてみた - DataprocとGCFを使った緩いデータ基盤 - Lean Baseball

                                                      最近の野球界隈の出来事が斜め上すぎて驚いてるマンです.*1 本業の仕事および, 本業じゃない個人開発や趣味プログラミングにおいて, データの量が多くて 単位やフォーマットが不揃いで それでも仕事(もしくは趣味の分析)をこなすため, いい感じの使いやすいデータセットにしないと(使命感) という機会は非常に多いです. いや, 機会が多いというより多かれ少なかれ毎日戦っている気がします. 今回は, ちょっとした分析とお遊びのため, メジャーリーグの公式データサイト「Baseball Savant」のデータを使ったBigQueryデータベースを作りたくなったので, クローラーでBaseball Savantのデータを取ってCSVにして CSVからデータを集計したり整えたりしていい感じの単位にして BigQueryから使えるようにしてみたよ! というタスクをGoogle Cloud Platform

                                                        野球のビッグデータをGCPとPySparkでいい感じに使いやすくしてみた - DataprocとGCFを使った緩いデータ基盤 - Lean Baseball
                                                      • 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
                                                        • Announcing TypeScript 5.2 - TypeScript

                                                          Today we’re excited to announce the release of TypeScript 5.2! If you’re not familiar with TypeScript, it’s a language that builds on top of JavaScript by making it possible to declare and describe types. Writing types in our code allows us to explain intent and have other tools check our code to catch mistakes like typos, issues with null and undefined, and more. Types also power TypeScript’s edi

                                                            Announcing TypeScript 5.2 - TypeScript
                                                          • Node.js

                                                            Notable changes built-in .env file support Starting from Node.js v20.6.0, Node.js supports .env files for configuring environment variables. Your configuration file should follow the INI file format, with each line containing a key-value pair for an environment variable. To initialize your Node.js application with predefined configurations, use the following CLI command: node --env-file=config.env

                                                              Node.js
                                                            • 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)
                                                              • March 2025 (version 1.99)

                                                                Update 1.99.1: The update addresses these security issues. Update 1.99.2: The update addresses these issues. Update 1.99.3: The update addresses these issues. Downloads: Windows: x64 Arm64 | Mac: Universal Intel silicon | Linux: deb rpm tarball Arm snap Welcome to the March 2025 release of Visual Studio Code. There are many updates in this version that we hope you'll like, some of the key highligh

                                                                  March 2025 (version 1.99)
                                                                • Weird Lexical Syntax

                                                                  I just learned 42 programming languages this month to build a new syntax highlighter for llamafile. I feel like I'm up to my eyeballs in programming languages right now. Now that it's halloween, I thought I'd share some of the spookiest most surprising syntax I've seen. The languages I decided to support are Ada, Assembly, BASIC, C, C#, C++, COBOL, CSS, D, FORTH, FORTRAN, Go, Haskell, HTML, Java,

                                                                    Weird Lexical Syntax
                                                                  • 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

                                                                    • AST vs. Bytecode: Interpreters in the Age of Meta-Compilation

                                                                      233 AST vs. Bytecode: Interpreters in the Age of Meta-Compilation OCTAVE LAROSE, University of Kent, UK SOPHIE KALEBA, University of Kent, UK HUMPHREY BURCHELL, University of Kent, UK STEFAN MARR, University of Kent, UK Thanks to partial evaluation and meta-tracing, it became practical to build language implementations that reach state-of-the-art peak performance by implementing only an interprete

                                                                      • April 2022 (version 1.67)

                                                                        Join a VS Code Dev Days event near you to learn about AI-assisted development in VS Code. Update 1.67.1: The update addresses this security issue. Update 1.67.2: The update addresses these issues. Downloads: Windows: x64 Arm64 | Mac: Universal Intel silicon | Linux: deb rpm tarball Arm snap Welcome to the April 2022 release of Visual Studio Code. There are many updates in this version that we hope

                                                                          April 2022 (version 1.67)
                                                                        • May 2025 (version 1.101)

                                                                          Release date: June 12, 2025 Security update: The following extension has security updates: ms-python.python. Update 1.101.1: The update addresses these issues. Update 1.101.2: The update addresses these issues. Downloads: Windows: x64 Arm64 | Mac: Universal Intel silicon | Linux: deb rpm tarball Arm snap Welcome to the May 2025 release of Visual Studio Code. There are many updates in this version

                                                                            May 2025 (version 1.101)
                                                                          • How I developed a faster Ruby interpreter | Red Hat Developer

                                                                            In this article, I will describe my efforts to implement a faster interpreter for CRuby, the Ruby language interpreter, using a dynamically specialized internal representation (IR). I believe this article will interest developers trying to improve the interpreter performance of dynamic programming languages (e.g., CPython developers). I will cover the following topics: Existing CRuby interpreter a

                                                                              How I developed a faster Ruby interpreter | Red Hat Developer
                                                                            • Implementing Logic Programming

                                                                              Most of my readers are probably familiar with procedural programming, object-oriented programming (OOP), and functional programming (FP). The majority of top programming languages on all of the language popularity charts (like TIOBE) support all three to some extent. Even if a programmer avoided one or more of those three paradigms like the plague, they’re likely at least aware of them and what th

                                                                                Implementing Logic Programming
                                                                              • You Want Modules, Not Microservices

                                                                                Blog Home Archive Sections Some of my Favorites (Collections) Management Tips Speaker Tips Developer Relations Thoughts Interop Briefs Some of my Favorites (Individual posts) O/R-M is the Vietnam of Computer Science The Fallacies of Enterprise Computing SSCLI 2.0 Internals Recommended reading list Functional Java On Finding learning The Value of Failure Programming Promises; a Programmer's Hippocr

                                                                                • Better Fbx Importer & Exporter

                                                                                  About Virus WarningThe Bitdefender Enterprise Support Team has verified that it is a false positive, here is the reply: Hello, Thank you for contacting the Bitdefender Enterprise Support Team. We have received an update from our laboratories. The files are clean and detection should be removed in the next couple of updates. Please let us know if there is anything else we can assist you with or if

                                                                                    Better Fbx Importer & Exporter