並び順

ブックマーク数

期間指定

  • から
  • まで

1 - 40 件 / 90件

新着順 人気順

python for loop else continueの検索結果1 - 40 件 / 90件

  • MCPでLLMに行動させる - Terraformを例とした tfmcp の紹介 - じゃあ、おうちで学べる

    はじめに こんにちは!今回は、私が最近開発した tfmcp というツールを紹介します。これは Terraform を LLM(大規模言語モデル)から操作できるようにするツールで、Model Context Protocol (MCP) を活用しています。 github.com このブログが良ければ読者になったり、GitHub リポジトリにStarをいただけると開発の励みになります。nwiizoをフォロワーしてくれるのもありがたいです。より良いツール開発のためのフィードバックもお待ちしています! MCP とは何か? 記事を始める前に、まず MCP (Model Context Protocol) について簡単に説明しましょう。MCP についてより詳しい情報は、公式ドキュメント modelcontextprotocol.io や Anthropic の Model Context Protoc

      MCPでLLMに行動させる - Terraformを例とした tfmcp の紹介 - じゃあ、おうちで学べる
    • N番目の素数を求める - すぎゃーんメモ

      SNSなどで話題になっていたので調べてみたら勉強になったのでメモ。 環境 Pythonでの実装例 例1 例2 例3 エラトステネスの篩 Rustでの実装例 試し割り法 エラトステネスの篩 アトキンの篩 おまけ: GMP Benchmark 高速化のテクニック 上限個数を見積もる Wheel factorization オチ Repository References 環境 手元のMacBook Pro 13-inchの開発機で実験した。 2.8 GHz Intel Core i7 16 GB 2133 MHz LPDDR3 Pythonでの実装例 例1 最も単純に「2以上p未満のすべての数で割ってみて余りが0にならなかったら素数」とする、brute force 的なアプローチ。 import cProfile import io import pstats import sys def m

        N番目の素数を求める - すぎゃーんメモ
      • とほほのRust入門 - とほほのWWW入門

        Rustとは インストール Hello world Cargoプロジェクト キーワード コメント(//) 値 変数・定数(let, mut, const) 型 基本の型(bool, i16, char, str...) 型変換(as) 構造体(struct) 共用体(union) 列挙型(enum) タプル(tup) 配列(array) ベクタ(vec) ハッシュマップ(HashMap) 文字列(&str, String) 演算子(+ - ...) ヒープ領域(Box) スライス(&var[n..m]) 関数(fn) クロージャー(|...|{...}) マクロ(macro_rules!) 制御構文 条件分岐(if) 繰り返し(while) 繰り返し(for) ループ(loop) ループ制御(break, continue) マッチ(match) インプリメンテーション(impl) トレイ

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

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

            防衛省サイバーコンテスト 2025 writeup - st98 の日記帳 - コピー
          • Building a tiny Linux from scratch

            Last week, I built a tiny Linux system from scratch, and booted it on my laptop! Here’s what it looked like: Let me tell you how I got there. I wanted to learn more about how the Linux kernel works, and what’s involved in booting it. So I set myself the goal to cobble together the bare neccessities required to boot into a working shell. In the end, I had a tiny Linux system with a size of 2.5 MB,

              Building a tiny Linux from scratch
            • Microsoft Power Automate DesktopでRPAを実現してみる | 🌴 officeの杜 🥥

              自分自身の個人的意見としては、エンドユーザコンピューティングは大いに結構だと思ってるけれど、一方で日本でジリジリと熱さが消えつつある国内の有象無象のRPAについては滅んだほうが良いとも思ってる。理由は後述するとして、本日良いニュースが発表されました。Power Automate Desktopについて追加費用無し無償で利用可能になるとのこと。これは既にあるMicrosoft365のEnterpriseプランなどに標準で利用できてるPower Automateのデスクトップ版のようで、Windows10に標準でついてくるようになるとのこと。 ということで、現時点のMicrosoft365で使えてるPower Automate Desktopを使ってみて、どんな感じなのか?またリリース後にその違いなどをここに記述していこうかなと思っています。また、Seleniumベースのウェブ自動化についても

                Microsoft Power Automate DesktopでRPAを実現してみる | 🌴 officeの杜 🥥
              • Agentic Coding Recommendations

                There is currently an explosion of people sharing their experiences with agentic coding. After my last two posts on the topic, I received quite a few questions about my own practices. So, here goes nothing. Preface For all intents and purposes, here’s what I do: I predominently use Claude Code with the cheaper Max subscription for $100 a month 1. That works well for several reasons: I exclusively

                  Agentic Coding Recommendations
                • 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
                  • Python×株式投資:従来の100倍!銘柄選抜のバックテストを高速化した話 - Qiita

                    # ----------------------------- # 2nd Screening V1 # ----------------------------- import time global_start_time = time.time() from google.colab import drive drive.mount('/content/drive') import pandas as pd import numpy as np import os from tqdm.notebook import tqdm import yfinance as yf from curl_cffi import requests # -------------------------------------------------- # ヘルパー関数定義セクション # --------

                      Python×株式投資:従来の100倍!銘柄選抜のバックテストを高速化した話 - Qiita
                    • How I Use Every Claude Code Feature

                      I use Claude Code. A lot. As a hobbyist, I run it in a VM several times a week on side projects, often with --dangerously-skip-permissions to vibe code whatever idea is on my mind. Professionally, part of my team builds the AI-IDE rules and tooling for our engineering team that consumes several billion tokens per month just for codegen. The CLI agent space is getting crowded and between Claude Cod

                        How I Use Every Claude Code Feature
                      • Python 3.13 gets a JIT

                        Happy New Year everyone! In late December 2023 (Christmas Day to be precise), CPython core developer Brandt Bucher submitted a little pull-request to the Python 3.13 branch adding a JIT compiler. This change, once accepted would be one of the biggest changes to the CPython Interpreter since the Specializing Adaptive Interpreter added in Python 3.11 (which was also from Brandt along with Mark Shann

                          Python 3.13 gets a JIT
                        • 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
                          • Things we learned about LLMs in 2024

                            31st December 2024 A lot has happened in the world of Large Language Models over the course of 2024. Here’s a review of things we figured out about the field in the past twelve months, plus my attempt at identifying key themes and pivotal moments. This is a sequel to my review of 2023. In this article: The GPT-4 barrier was comprehensively broken Some of those GPT-4 models run on my laptop LLM pri

                              Things we learned about LLMs in 2024
                            • RFC 9562: Universally Unique IDentifiers (UUIDs)

                               Internet Engineering Task Force (IETF) K. Davis Request for Comments: 9562 Cisco Systems Obsoletes: 4122 B. Peabody Category: Standards Track Uncloud ISSN: 2070-1721 P. Leach University of Washington May 2024 Universally Unique IDentifiers (UUIDs) Abstract This specification defines UUIDs (Universally Unique IDentifiers) -- also known as GUIDs (Globally Unique IDentifiers) -- and a Uniform Resou

                                RFC 9562: Universally Unique IDentifiers (UUIDs)
                              • 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

                                  • Building a Toy Programming Language in Python

                                    I thought it would be fun to go outside of my comfort zone of web development topics and write about something completely different and new, something I have never written about before. So today, I'm going to show you how to implement a programming language! The project will parse and execute programs written in a simple language I called my (I know it's a lame name, but hey, it is "my" language).

                                      Building a Toy Programming Language in Python
                                    • A new way to bring garbage collected programming languages efficiently to WebAssembly · V8

                                      Show navigation A recent article on WebAssembly Garbage Collection (WasmGC) explains at a high level how the Garbage Collection (GC) proposal aims to better support GC languages in Wasm, which is very important given their popularity. In this article, we will get into the technical details of how GC languages such as Java, Kotlin, Dart, Python, and C# can be ported to Wasm. There are in fact two m

                                      • 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

                                        • 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
                                            • The OpenSSL punycode vulnerability (CVE-2022-3602): Overview, detection, exploitation, and remediation | Datadog Security Labs

                                              emerging threats and vulnerabilities The OpenSSL punycode vulnerability (CVE-2022-3602): Overview, detection, exploitation, and remediation November 1, 2022 emerging vulnerability On November 1, 2022, the OpenSSL Project released a security advisory detailing a high-severity vulnerability in the OpenSSL library. Deployments of OpenSSL from 3.0.0 to 3.0.6 (included) are vulnerable and are fixed in

                                                The OpenSSL punycode vulnerability (CVE-2022-3602): Overview, detection, exploitation, and remediation | Datadog Security Labs
                                              • Coroutines and effects

                                                For the past few months I’ve been mulling over some things that Russell Johnston made me realize about the relationship between effect systems and coroutines. You can read more of his thoughts on this subject here, but he made me realize that effect systems (like that found in Koka) and coroutines (like Rust’s async functions or generators) are in some ways isomorphic to one another. I’ve been pon

                                                • 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

                                                  • 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

                                                    • 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

                                                      • Andrej Karpathy — AGI is still a decade away

                                                        The Andrej Karpathy episode. Andrej explains why reinforcement learning is terrible (but everything else is much worse), why model collapse prevents LLMs from learning the way humans do, why AGI will just blend into the previous ~2.5 centuries of 2% GDP growth, why self driving took so long to crack, and what he sees as the future of education. Watch on YouTube; listen on Apple Podcasts or Spotify

                                                          Andrej Karpathy — AGI is still a decade away
                                                        • 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

                                                          • I Shipped a macOS App Built Entirely by Claude Code

                                                            I recently shipped Context, a native macOS app for debugging MCP servers. The goal was to build a useful developer tool that feels at home on the platform, powered by Apple's SwiftUI framework. I've been building software for the Mac since 2008, but this time was different: Context was almost 100% built by Claude Code1. There is still skill and iteration involved in helping Claude build software,

                                                              I Shipped a macOS App Built Entirely by Claude Code
                                                            • 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

                                                              • GIMP - Development version: GIMP 2.99.12 Released

                                                                GIMP 2.99.12 is a huge milestone towards GIMP 3.0. Many of the missing pieces are getting together, even though it is still a work in progress. As usual, issues are expected and in particular in this release which got important updates in major areas, such as canvas interaction code, scripts, but also theming… “CMYK space invasion”, by Jehan (based on GPLv3 code screencast), Creative Commons by-sa

                                                                  GIMP - Development version: GIMP 2.99.12 Released
                                                                • 【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

                                                                    • January 2023 (version 1.75)

                                                                      Update 1.75.1: The update addresses these issues. Downloads: Windows: x64 Arm64 | Mac: Universal Intel silicon | Linux: deb rpm tarball Arm snap Welcome to the January 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: Profiles - Create and share profiles to configure extensions, settings, shortcuts, and more. VS

                                                                        January 2023 (version 1.75)
                                                                      • August 2021 (version 1.60)

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

                                                                          August 2021 (version 1.60)
                                                                        • o1 pro + AIエンジニアにチャットで指示しながら、研究的なことをさせてみる |Kan Hatakeyama

                                                                          はじめに自律的にプログラミングをしてくれるAIエンジニアをいい感じに動かせるようになってきたので、今日はChatGPT + devinで研究的なことをさせてみます。 自動研究といえば、昨年の夏に話題になった、Sakana AIのAIサイエンティストが有名です。 ただ、研究のネタを考えるのはまだあまり得意でない気がしたので、今回は適宜、そこはスマホで指示を出しながら、human in the loopで進めていきます。 最初のセットアップを除いて、チャットをするだけで、基本的な研究作業をこなせそう感じでした。 下準備: リポジトリを作ってdevinに登録するはじめに、パソコンを使って設定をします。このセクションの作業以降は、スマホがあればOKです。 githubでレポジトリを作り、一つだけ、開発方針に関するファイルを作っておきます。 DevelopmentPolycy.md 開発、コメントな

                                                                            o1 pro + AIエンジニアにチャットで指示しながら、研究的なことをさせてみる |Kan Hatakeyama
                                                                          • Who needs Graphviz when you can build it yourself?

                                                                            We recently overhauled our internal tools for visualizing the compilation of JavaScript and WebAssembly. When SpiderMonkey’s optimizing compiler, Ion, is active, we can now produce interactive graphs showing exactly how functions are processed and optimized. You can play with these graphs right here on this page. Simply write some JavaScript code in the test function and see what graph is produced

                                                                              Who needs Graphviz when you can build it yourself?
                                                                            • Why We Use Julia, 10 Years Later

                                                                              Exactly ten years ago today, we published "Why We Created Julia", introducing the Julia project to the world. At this point, we have moved well past the ambitious goals set out in the original blog post. Julia is now used by hundreds of thousands of people. It is taught at hundreds of universities and entire companies are being formed that build their software stacks on Julia. From personalized me

                                                                                Why We Use Julia, 10 Years Later
                                                                              • Go Conference Online 2021 Autumnが開催されました&作って学ぶシェル | フューチャー技術ブログ

                                                                                Go Conference Online 2021 Autumnが開催されました。スタッフのみなさん、登壇者、参加者のみなさん、お疲れ様でした。フューチャーは今回もブロンズスポンサーでした。また、フューチャーからは伊藤(真)、辻、渋川の三人が登壇しました。 その中の、渋川の発表内容を紹介します。タイトルは「Learning Computer Systems by Crafting: Shell 〜作って学ぶシェル〜」で、シェルの動作の紹介をしつつ、自分で実装してみるには、という感じの解説でした。Goならわかるシステムプログラミング(書籍はこちら)では詳しく触れていなかったシェルについて詳しく説明する追加コンテンツです。 発表資料はこちらです。 Twitter等でたまに話題になるのは、次のようなことです。 「若い人の中にはシェルの概念をあまり知らない人もいる」 「はたしてそのような人はどのよ

                                                                                  Go Conference Online 2021 Autumnが開催されました&作って学ぶシェル | フューチャー技術ブログ
                                                                                • 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