並び順

ブックマーク数

期間指定

  • から
  • まで

1 - 40 件 / 96件

新着順 人気順

python get index and value for loopの検索結果1 - 40 件 / 96件

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

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

      防衛省サイバーコンテスト 2025 writeup - st98 の日記帳 - コピー
    • 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
        • 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

            • A search engine in 80 lines of Python

              February 05, 2024 · 9 mins · 1675 words Share on: X · HN Discussion on HackerNews. Last September I hopped on board with Wallapop as a Search Data Scientist and since then part of my work has been working with Solr, an open-source search engine based on Lucene. I’ve got the basics of how a search engine works, but I had this itch to understand it even better. So, I rolled up my sleeves and decided

              • 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

                  • 📖 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 ドコモ開発者ブログ
                    • 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
                        • 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
                          • 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
                            • 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)
                              • 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

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

                                            • February 2021 (version 1.54)

                                              Join a VS Code Dev Days event near you to learn about AI-assisted development in VS Code. Update 1.54.1: The update addresses an issue with an extension dependency. Update 1.54.2: The update addresses these issues. Update 1.54.3: The update addresses this issue. Downloads: Windows: x64 Arm64 | Mac: Universal Intel silicon | Linux: deb rpm tarball Arm snap Welcome to the February 2021 release of Vi

                                                February 2021 (version 1.54)
                                              • Patterns for Building LLM-based Systems & Products

                                                Patterns for Building LLM-based Systems & Products [ llm engineering production 🔥 ] · 66 min read Discussions on HackerNews, Twitter, and LinkedIn “There is a large class of problems that are easy to imagine and build demos for, but extremely hard to make products out of. For example, self-driving: It’s easy to demo a car self-driving around a block, but making it into a product takes a decade.”

                                                  Patterns for Building LLM-based Systems & Products
                                                • 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
                                                  • 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
                                                      • Parsing Protobuf at 2+GB/s: How I Learned To Love Tail Calls in C

                                                        [Note: there have been several developments in this space since this article was published. See A Tail Calling Interpreter For Python (And Other Updates) for the latest information about this technique.] I just landed an exciting feature in the main branch of the Clang compiler. Using the [[clang::musttail]] or __attribute__((musttail)) statement attributes, you can now get guaranteed tail calls i

                                                        • 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
                                                            • Advent of Code on the Nintendo DS

                                                              It is December. That means annoying Christmas things are everywhere, including but not limited to the annual programming semi-competition known as Advent of Code. The problem with Advent of Code is that it is a waste of time. Most of the puzzles are in the realm of either string processing (somewhat applicable to programming), logic puzzles (not really applicable to most programming), or stupid go

                                                              • 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

                                                                  • The Go Programming Language and Environment – Communications of the ACM

                                                                    Go is a programming language created at Google in late 2007 and released as open source in November 2009. Since then, it has operated as a public project, with contributions from thousands of individuals and dozens of companies. Go has become a popular language for building cloud infrastructure: Docker, a Linux container manager, and Kubernetes, a container deployment system, are core cloud techno

                                                                    • ​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
                                                                      • Here’s how I use LLMs to help me write code

                                                                        11th March 2025 Online discussions about using Large Language Models to help write code inevitably produce comments from developers who’s experiences have been disappointing. They often ask what they’re doing wrong—how come some people are reporting such great results when their own experiments have proved lacking? Using LLMs to write code is difficult and unintuitive. It takes significant effort

                                                                          Here’s how I use LLMs to help me write code
                                                                        • 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

                                                                          • Eliciting Reasoning in Language Models with Cognitive Tools

                                                                            arXiv:2506.12115v1 [cs.CL] 13 Jun 2025 Eliciting Reasoning in Language Models with Cognitive Tools Brown Ebouky IBM Research - Zurich ETH Zurich Brown.Ebouky@ibm.com Andrea Bartezzaghi IBM Research - Zurich abt@zurich.ibm.com Mattia Rigotti IBM Research - Zurich mrg@zurich.ibm.com Abstract The recent advent of reasoning models like OpenAI’s o1 was met with excited spec- ulation by the AI community

                                                                            • 研究室内コーヒーメーカーの課金処理を【画像認識+クラウドソーシング】で全自動化した話 - Qiita

                                                                              Deleted articles cannot be recovered. Draft of this article would be also deleted. Are you sure you want to delete this article? 学生だった4年前ぐらいにやったことなんですけど、聞いてください。 ※国内に数少ないマイクロタスク型クラウドソーシング関連の記事をせっせと拡充しています。 ご興味ある方はフォローや過去記事も是非! 【MTurk入門】機械学習とかでよく耳にするAmazon Mechanical Turkとは&活用例 Amazon Mechanical Turk API (Python, boto3)を使ってお手軽タスク外注 あらすじ コーヒーマシン使用履歴をうまく記録したい 大学の研究室内で共用のコーヒーメーカー(豆も挽いてくれるやつ)があって、結構な人数

                                                                                研究室内コーヒーメーカーの課金処理を【画像認識+クラウドソーシング】で全自動化した話 - Qiita
                                                                              • j3s.sh

                                                                                my website is one binary 2022-04-06 ---------------------------- a.k.a. this one weird trick that inspires me to program creatively i have struggled for years to figure out a website framework that feels good to me. i tried all of the classics, including but limited to: - ghost - hugo - jekyll - sr.ht + tarball - manual html editing i have very high and unusual standards, and none of the above fel

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