並び順

ブックマーク数

期間指定

  • から
  • まで

1 - 40 件 / 63件

新着順 人気順

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

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

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

      防衛省サイバーコンテスト 2025 writeup - st98 の日記帳 - コピー
    • 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から始める株自動取引システムの作り方
                  • 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

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

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

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

                                                        • prompts.chat

                                                          Welcome to the “Awesome ChatGPT Prompts” repository! While this collection was originally created for ChatGPT, these prompts work great with other AI models like Claude, Gemini, Hugging Face Chat, Llama, Mistral, and more. ChatGPT is a web interface created by OpenAI that provides access to their GPT (Generative Pre-trained Transformer) language models. The underlying models, like GPT-4o and GPT-o

                                                          • Modern Python performance considerations

                                                            There is a lot of work going on right now on speeding up Python; Kevin Modzelewski gave a presentation at PyCon 2022 on some of that work. Much of it has implications for Python programmers in terms of how to best take advantage of these optimizations in their code. He gave an overview of some of the projects, the kinds of optimizations being worked on, and provided some benchmarks to give a gener

                                                            • A 2025 Survey of Rust GUI Libraries

                                                              I did this in 2020 and then again in 2021, but I’m in the mood to look around again. Let’s look through Are We GUI Yet? and see what’s up these days. The task today is to have a text label and an input field that can change the text in the label. In React, for example, this is basically free: const Demo = () => { let [state, setState] = useState("Hello, world!"); return ( <div> <p>{state}</p> <inp

                                                              • What's New in Emacs 28.1?

                                                                Try Mastering Emacs for free! Are you struggling with the basics? Have you mastered movement and editing yet? When you have read Mastering Emacs you will understand Emacs. It’s that time again: there’s a new major version of Emacs and, with it, a treasure trove of new features and changes. Notable features include the formal inclusion of native compilation, a technique that will greatly speed up y

                                                                • Raspberry Pi Pico W で Httpサーバ(microdot)とセンサーによるHTTPリクエスト機能を同時に稼働させる

                                                                  Raspberry Pi Pico W で Httpサーバ(microdot)とセンサーによるHTTPリクエスト機能を同時に稼働させる Raspberry Pi Pico W が発表されました。日本ではまだ未発売ですが、技適は取得されたようですので近いうちに国内販売がされそうです。 試しに、Webサーバ ( Microdot )とWebクライアント(urequest) を uasyncio で並列実行するコードを書きましたので、紹介します。 今回作成したコードや動作している動画は、Github で公開しています。 ytyng/rpi-pico-w-webserver-and-client: Raspberry Pi Pico W webserver and client sample code Raspberry Pi Pico W とは コストパフォーマンスが高いマイクロコントローラです

                                                                    Raspberry Pi Pico W で Httpサーバ(microdot)とセンサーによるHTTPリクエスト機能を同時に稼働させる
                                                                  • Vim9 script for Python Developers · GitHub

                                                                    vim9script4pythondevelopers.md Vim9 script for Python Developers Vim9 script�Vim script��������������������������������������������������系��� def������義����������Vim script��vim9script�����使����������(vim9script���

                                                                      Vim9 script for Python Developers · GitHub
                                                                    • Node.js

                                                                      Notable changes Add support for externally shared js builtins By default Node.js is built so that all dependencies are bundled into the Node.js binary itself. Some Node.js distributions prefer to manage dependencies externally. There are existing build options that allow dependencies with native code to be externalized. This commit adds additional options so that dependencies with JavaScript code

                                                                        Node.js
                                                                      • Node.js — Node.js v22.10.0 (Current)

                                                                        Or if the package is only meant to be run on Node.js and wants to fallback to CJS on older versions that don't have require(esm): { "type": "module", "exports": { // On new version of Node.js, both require() and import get the ESM version "module-sync": "./index.js", // On older version of Node.js, where "module-sync" and require(esm) are // not supported, use the CJS version to avoid dual-package

                                                                          Node.js — Node.js v22.10.0 (Current)
                                                                        • bytecode interpreters for tiny computers ⁑ Dercuano

                                                                          Introduction: Density Is King (With a Tiny VM) I've previously come to the conclusion that there's little reason for using bytecode in the modern world, except in order to get more compact code, for which it can be very effective. So, what kind of a bytecode engine will give you more compact code? Suppose I want a bytecode interpreter for a very small programming environment, specifically to minim

                                                                          • A Lisp REPL as my main shell

                                                                            If you enjoy this article and would like to help me keep writing, consider chipping in, every little bit helps to keep me going :) Thank you! Update: As of 2021-02-07, not all the code and configurations used in this presentation have been published. Should happen in the coming days, stay tuned! Introduction video The concepts I’m going to present in this article were featured in a presentation at

                                                                            • A string formatting library in 65 lines of C++

                                                                              In this write-up, I will walk you through an implementation of a string formatting library for C++ I came up with for my video game. The end result came out really compact, at only 65 lines of code—providing a skeleton that can be supplemented with additional functionality at low cost. Usage Given a format buffer… char buffer[64]; String_Buffer buf = {str, sizeof str}; …the fmt::format function pr

                                                                              • Plan 9 Desktop Guide

                                                                                PLAN 9 DESKTOP GUIDE INDEX What is Plan 9? Limitations and Workarounds Connecting to Other Systems VNC RDP SSH 9P Other methods Porting Applications Emulating other Operating Systems Virtualizing other Operating Systems Basics Window Management Copy Pasting Essential Programs Manipulating Text in the Terminal Acme - The Do It All Application Multiple Workspaces Tiling Windows Plumbing System Admin

                                                                                • A Deep Dive into eBPF: Writing an Efficient DNS Monitoring.

                                                                                  eBPF / XDP is an in-kernel virtual machine, provides a high-level library, instruction set and an execution environment inside the Linux kernel. It’s used in many Linux kernel subsystems, most prominently networking, tracing, debugging and security. Including to modify the processing of packets in the kernel and also allows the programming of network devices such as SmartNICs. Use cases in eBPF im

                                                                                    A Deep Dive into eBPF: Writing an Efficient DNS Monitoring.