並び順

ブックマーク数

期間指定

  • から
  • まで

1 - 40 件 / 115件

新着順 人気順

get array index from value pythonの検索結果1 - 40 件 / 115件

  • ほんで、MEGA BIGくじにいくら賭ければいいの?|morio

    この記事では、MEGA BIGくじの最適な賭け額、最適な賭け額の算出方法について説明する。 ※この記事の内容は間違っている可能性があるので注意してください。間違いがあればご指摘いただけると嬉しいです。できれば専門家にレビューしてほしいです。 ※この記事はMEGA BIGの購入を薦めているわけではありません。 MEGA BIG 祭2024/8/30、MEGA BIG祭が突如発生した。 MEGA BIGは通常期待値がマイナスであるが、台風の影響でサッカーの試合が一部中止になり第1476回のMEGA BIGの期待値が1を超える可能性があるという投稿があったのだ。 toto MEGA BIGが熱い。 対象の12試合中4試合が中止(自動的中扱い)なので、8試合分当たれば1等というレイドイベント発生。現在キャリーオーバー61億円。 公営ギャンブルとしてはありえない期待値。 なおtoto BIG/100

      ほんで、MEGA BIGくじにいくら賭ければいいの?|morio
    • FastAPI入門 - モダンなPythonフレームワークの特性をチュートリアルで手軽に学ぶ|ハイクラス転職・求人情報サイト アンビ(AMBI)

      FastAPI入門 - モダンなPythonフレームワークの特性をチュートリアルで手軽に学ぶ PythonのWebフレームワークとしていま注目を集めるFastAPIは、シンプルにコードが書けるだけでなく、パフォーマンスが高いWebアプリケーションのバックエンドサーバーが構築可能です。同フレームワークの勘所をPythonスペシャリストの杜世橋さんが、初心者向けのハンズオン、そしてより実践的な画像への自動タグ付けサービス実装をとおして解説します。 FastAPIはいま非常に注目されているPythonのWebフレームワークの1つです。Flaskのようにシンプルに書ける一方でPythonのType Hintの機能をうまく活用し、HTTPのリクエスト/レスポンスをPythonの関数の引数/戻り値とシームレスにマッピングして非常に効率的に開発ができるのが最大の特徴です。非同期処理にも対応していてその名

        FastAPI入門 - モダンなPythonフレームワークの特性をチュートリアルで手軽に学ぶ|ハイクラス転職・求人情報サイト アンビ(AMBI)
      • 防衛省サイバーコンテスト 2025 writeup - st98 の日記帳 - コピー

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

          防衛省サイバーコンテスト 2025 writeup - st98 の日記帳 - コピー
        • “Tao of Node - Design, Architecture & Best Practices” 日本語翻訳

          私が働いているAniqueという会社では、1年前に全てのソフトウェアでTypescriptを採用することにしました。私たちが開発している進撃の巨人のNFTサービス “Attack on Titan: Legacy” でも採用しています。 TypescriptではNestJSという素晴らしいAPIフレームワークを利用することができ、生産性高く開発を続けることができます。また、私たちはフロントエンドでNext.jsを利用しています。言語レベルでのコンテキストスイッチを抑えることで、一人のエンジニアがフロントエンドとバックエンドのどちらもの機能を開発する環境が作れました。 しかし、Nodeならではの作法や設計について、Web上にはたくさんの情報があるものの、あまりにも情報が多すぎて、まとまったプラクティスになかなか出会うことができませんでした。そのため、最初はチーム内での共通認識を作るのに苦労し

            “Tao of Node - Design, Architecture & Best Practices” 日本語翻訳
          • 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
            • Coding Agentについてのまとめ (2026年1月)

              LLMによるコード補完の登場 (2021年) GitHub Copilotの登場 我々がよく知るLLMによる支援はまず GitHub Copilot から始まりました。これはGPT-3 (OpenAI Codex, 現在のCodexと名前が同じで本当にややこしい) をベースとしたコード補完システムで、タイピングをしていると自動的にその行の続きを予測してくれるものです autocompleteとの違い それ以前にもIntelliSenseのようなautocompleteがありましたし、より進歩したn-gramなどを用いたものはありましたが、LLMをベースとしたものはTabnine (Tabnineは初期はn-gramモデル) やCopilotからとなります チャットベースのコードアシストの時代 (2022-2023年) ChatGPTの登場 ChatGPT以降、チャットによる対話形式でコード

                Coding Agentについてのまとめ (2026年1月)
              • 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
                • AIエージェントのUXを進化させる「A2UI」でアプリを構築 - Taste of Tech Topics

                  こんにちは。大塚です。 普段は生成AIを利用したサービスの開発に携わっているのですが、直近の仕事では、数理最適化の手法を扱う機会がありました。 実は、大学の授業で数理最適化をかじっており、教授がよく 「人の勘や経験に頼っている部分を数式に落とし込むことで、合理的な意思決定ができるようにしよう。」 といっていたことを思い出しました。 まさに今、それを仕事で実践できており、面白くなってきました。 さて、今回のテーマは最適化ではなく、AIエージェントのUIについてです。 現在の生成AIアプリのUIといえば、「チャット」形式がほとんどの状況だと思いますが、チャットのアプリは汎用的な一方で、入力を制御したり、画像や動画の表示が難しかったりと、限界を感じることってありませんか? そんな悩みを解決してくれる、「A2UI(Agent to UI)」という、AIエージェント用のUIプロトコルが、2025年1

                    AIエージェントのUXを進化させる「A2UI」でアプリを構築 - Taste of Tech Topics
                  • 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. 2slides - An MCP server that provides tools to convert content into slides/PPT/presentation or generate slides/PPT/presentation with user intention. ActionKit by Paragon - Connect to 130+ SaaS inte

                      GitHub - modelcontextprotocol/servers: Model Context Protocol Servers
                    • プロと読み解くRuby 4.0 NEWS - STORES Product Blog

                      プロと読み解くRuby 4.0 NEWS テクノロジー部門技術推進グループの笹田(ko1)と遠藤(mame)です。Ruby (MRI: Matz Ruby Implementation、いわゆる ruby コマンド) の開発をしています。お金をもらって Ruby を開発しているのでプロの Ruby コミッタです。 本日 12/25 に、恒例のクリスマスリリースとして、Ruby 4.0.0 がリリースされました(Ruby 4.0.0 リリース | Ruby)。今年も STORES Product Blog にて Ruby 4.0 の NEWS.md ファイルの解説をします(ちなみに、STORES Advent Calendar 2025 の記事になります。他も読んでね)。NEWS ファイルとは何か、は以前の記事を見てください。 プロと読み解く Ruby 2.6 NEWS ファイル - クック

                        プロと読み解くRuby 4.0 NEWS - STORES Product 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

                          • Python standard library changes in recent years

                            With each major Python release, all the attention goes to the new language features: the walrus operator, dictionary merging, pattern matching. There is also a lot of writing about asyncio and typing modules — they are developing rapidly and are obviously important for the core team. The rest of the standard library modules receive undeservedly little attention. I want to fix this and tell you abo

                              Python standard library changes in recent years
                            • 巨人の肩に乗る

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

                                巨人の肩に乗る
                              • 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

                                • Deno で browser-use を自作してみた (勉強用)

                                  AI 経由でブラウザを操作する browser-use を deno で実装してみました。 元は python ですが、コア部分を自分で作れるように書き直しました。 注意: 勉強用の作例であって、本番で使えるものではないです。 以下の記事を読みながら実装しました tl;dr アクセシビリティ要素を列挙 各要素にブラウザ上でオーバーレイで操作用インデックスを書き込みつつ、インデックスに対応する xpath を作っておく claude のスクリーンショットと xpath を渡す claude に対応する xpath の操作方法を教える ツールとして対話的に実行 ステップ Tool Runner Puppeteer BrowesrTool Tool Runner まず、Tools を使って AI と対話する部分を作ります。 import { anthropic } from "@ai-sdk/a

                                    Deno で browser-use を自作してみた (勉強用)
                                  • 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!
                                    • Joining CSV and JSON data with an in-memory SQLite database

                                      Sponsored by: Honeycomb — AI agents behave unpredictably. Get the context you need to debug what actually happened. Read the blog 19th June 2021 The new sqlite-utils memory command can import CSV and JSON data directly into an in-memory SQLite database, combine and query it using SQL and output the results as CSV, JSON or various other formats of plain text tables. sqlite-utils memory The new feat

                                        Joining CSV and JSON data with an in-memory SQLite database
                                      • RubyのGVLを消し去りたいあなたへ(翻訳)|TechRacho by BPS株式会社

                                        概要 原著者の許諾を得て翻訳・公開いたします。 英語記事: So You Want To Remove The GVL? | byroot’s blog 原文公開日: 2025/01/29 原著者: byroot -- Railsコアコミッター、Rubyコミッターであり、ShopifyのRuby/Railsインフラチームのシニアスタッフエンジニアです 日本語タイトルは内容に即したものにしました。 GVLは「グローバルVMロック」の略ですが、「ジャイアントVMロック」とされることもあります。 参考: Rubyの(グローバル)VMロックをトレースする(翻訳) 参考: スレッド (Ruby 3.4 リファレンスマニュアル) 私がやりたいのは、Pitchforkに関する記事を書いて、これがどんな理由でできたのか、なぜ現在のような形になったのか、そして今後どうなるのかについて説明することです。しかし

                                          RubyのGVLを消し去りたいあなたへ(翻訳)|TechRacho by BPS株式会社
                                        • Claude Mythos Preview \ red.anthropic.com

                                          Assessing Claude Mythos Preview’s cybersecurity capabilities April 7, 2026 Nicholas Carlini, Newton Cheng, Keane Lucas, Michael Moore, Milad Nasr, Vinay Prabhushankar, Winnie Xiao Hakeem Angulu, Evyatar Ben Asher, Jackie Bow, Keir Bradwell, Ben Buchanan, David Forsythe, Daniel Freeman, Alex Gaynor, Xinyang Ge, Logan Graham, Kyla Guru, Hasnain Lakhani, Matt McNiece, Mojtaba Mehrara, Renee Nichol, A

                                          • 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
                                            • 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
                                              • 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)
                                                • 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

                                                  • 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
                                                    • 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

                                                      • 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
                                                        • The Ultimate Interactive JQ Guide

                                                          The Ultimate Interactive JQ Guide Learn how to search, query, and modify JSON data with 25 interactive jq examples and explanations Cover Photo by Pixabay Has this ever happened to you? You’ve just received a massive JSON file that looks like it was designed to confuse you. Or maybe you entered a command, and you got so much JSON that it looks incomprehensible. Important: Level up your jq skills w

                                                            The Ultimate Interactive JQ Guide
                                                          • June 2023 (version 1.80)

                                                            Update 1.80.1: The update addresses these issues. Update 1.80.2: The update addresses this security issue. Downloads: Windows: x64 Arm64 | Mac: Universal Intel silicon | Linux: deb rpm tarball Arm snap Welcome to the June 2023 release of Visual Studio Code. There are many updates in this version that we hope you'll like, some of the key highlights include: Accessibility improvements - Accessible V

                                                              June 2023 (version 1.80)
                                                            • What do I think about Lua after shipping a project with 60,000 lines of code?

                                                              Hi there! This is Oleg from Luden.io. We decided to have a deep and meaningful conversation about Lua programming language with Ivan Trusov, lead programmer of the video game Craftomation 101. It contains ~60,000 lines of Lua code and is made with Defold game engine. I asked Ivan to talk about the real issues and show real code, not the “hypothetical code, carefully prepared for the public to illu

                                                                What do I think about Lua after shipping a project with 60,000 lines of code?
                                                              • Kalyn: a self-hosting compiler for x86-64

                                                                Over the course of my Spring 2020 semester at Harvey Mudd College, I developed a self-hosting compiler entirely from scratch. This article walks through many interesting parts of the project. It’s laid out so you can just read from beginning to end, but if you’re more interested in a particular topic, feel free to jump there. Or, take a look at the project on GitHub. Table of contents What the pro

                                                                • Node.js — Node.js 24.0.0 (Current)

                                                                  2025-05-06, Version 24.0.0 (Current), @RafaelGSS and @juanarbol We’re excited to announce the release of Node.js 24! This release brings several significant updates, including the upgrade of the V8 JavaScript engine to version 13.6 and npm to version 11. Starting with Node.js 24, support for MSVC has been removed, and ClangCL is now required to compile Node.js on Windows. The AsyncLocalStorage API

                                                                    Node.js — Node.js 24.0.0 (Current)
                                                                  • Why I use attrs instead of pydantic

                                                                    This post is an account of why I prefer using the attrs library over Pydantic. I'm writing it since I am often asked this question and I want to have something concrete to link to. This is not meant to be an objective comparison of attrs and Pydantic; I'm not interested in comparing bullet points of features, nor can I be unbiased since I'm a major contributor to attrs (at time of writing, second

                                                                    • Wasm core dumps and debugging Rust in Cloudflare Workers

                                                                      Wasm core dumps and debugging Rust in Cloudflare Workers2023-08-14 A clear sign of maturing for any new programming language or environment is how easy and efficient debugging them is. Programming, like any other complex task, involves various challenges and potential pitfalls. Logic errors, off-by-ones, null pointer dereferences, and memory leaks are some examples of things that can make software

                                                                        Wasm core dumps and debugging Rust in Cloudflare Workers
                                                                      • Node.js 16.x runtime now available in AWS Lambda | Amazon Web Services

                                                                        AWS Compute Blog Node.js 16.x runtime now available in AWS Lambda This post is written by Dan Fox, Principal Specialist Solutions Architect, Serverless. You can now develop AWS Lambda functions using the Node.js 16 runtime. This version is in active LTS status and considered ready for general use. To use this new version, specify a runtime parameter value of nodejs16.x when creating or updating fu

                                                                          Node.js 16.x runtime now available in AWS Lambda | Amazon Web Services
                                                                        • YJIT: Building a New JIT Compiler Inside CRuby

                                                                          The 1980s and 1990s saw the genesis of Perl, Ruby, Python, PHP and JavaScript: interpreted, dynamically-typed programming languages which favored ease of use and flexibility over performance. In many ways, these programming languages are a product of the surrounding context. The 90s were the peak of the dot-com hype, and CPU clock speeds were still doubling roughly every 18 months. It looked like

                                                                            YJIT: Building a New JIT Compiler Inside CRuby
                                                                          • はじめての自然言語処理 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 でクイズに答えるモデルを作る | オブジェクトの広場
                                                                            • 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

                                                                              • JavaScript needs more helper functions for iteration (map, filter, etc.) – where should we put them?

                                                                                JavaScript needs more helper functions for iteration (map, filter, etc.) – where should we put them? Iteration is a standard that connects operations with data containers: Each operation that follows this standard, can be applied to each data container that implements this standard. In this blog post: We first explore three questions: How does JavaScript’s iteration work? What are its quirks? What

                                                                                • 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