並び順

ブックマーク数

期間指定

  • から
  • まで

1 - 37 件 / 37件

新着順 人気順

python exit for loop breakの検索結果1 - 37 件 / 37件

  • Minimal safe Bash script template

    Published on December 14, 2020   ·   Updated on December 16, 2020 Bash scripts. Almost anyone needs to write one sooner or later. Almost no one says “yeah, I love writing them”. And that’s why almost everyone is putting low attention while writing them. I won’t try to make you a Bash expert (since I’m not a one either), but I will show you a minimal template that will make your scripts safer. You

      Minimal safe Bash script template
    • プロと読み解く Ruby 3.0 NEWS - クックパッド開発者ブログ

      技術部の笹田(ko1)と遠藤(mame)です。クックパッドで Ruby (MRI: Matz Ruby Implementation、いわゆる ruby コマンド) の開発をしています。お金をもらって Ruby を開発しているのでプロの Ruby コミッタです。 本日 12/25 に、ついに Ruby 3.0.0 がリリースされました。一昨年、昨年に続き、今年も Ruby 3.0 の NEWS.md ファイルの解説をします。NEWS ファイルとは何か、は一昨年の記事を見てください(なお Ruby 3.0.0 から、NEWS.md にファイル名を変えました)。 プロと読み解く Ruby 2.6 NEWS ファイル - クックパッド開発者ブログ プロと読み解くRuby 2.7 NEWS - クックパッド開発者ブログ Ruby 3.0 は、Ruby にとってほぼ 8 年ぶりのメジャーバージョンア

        プロと読み解く Ruby 3.0 NEWS - クックパッド開発者ブログ
      • 防衛省サイバーコンテスト 2025 writeup - st98 の日記帳 - コピー

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

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

          • Rubyで始めるAIエージェント入門 | Wantedly Engineer Blog

            こんにちは。ウォンテッドリーの Enabling チームでバックエンドエンジニアをしている市古(@sora_ichigo_x)です。 現在、Enabling チームでは技術的な取り組みを社外にも発信すべく、メンバーが週替わりで技術ブログをリレー形式で執筆しています。前回は冨永さんによる「【計画編】 スカウト機能のマイクロサービス化を辞める判断について」でした。今回はAIエージェントを実装する話をします。 2025年に入り、「AIエージェント」という言葉が急速に浸透してきています。 そしてこれは単に利用ユーザーの関心が高まっているだけではなく、サービスを提供する側にとっても無視できない話です。主要ベンダーのSDKやAPIが次々と整備され、技術的には誰もがAIエージェントを社会実装できる環境が整いつつあります。つまり、AIが当たり前になる世界で、AI機能を持たないプロダクトは競争優位を維持でき

              Rubyで始めるAIエージェント入門 | Wantedly Engineer Blog
            • 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)
              • kyju.org - Piccolo - A Stackless Lua Interpreter

                Piccolo - A Stackless Lua Interpreter 2024-05-01 History of piccolo A "Stackless" Interpreter Design Benefits of Stackless Cancellation Pre-emptive Concurrency Fuel, Pacing, and Custom Scheduling "Symmetric" Coroutines and coroutine.yieldto The "Big Lie" Rust Coroutines, Lua Coroutines, and Snarfing Zooming Out piccolo is an interpreter for the Lua language written in pure, mostly safe Rust with a

                • 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

                    • 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)
                      • LLM音声対話システムの応答を高速化してみた | CyberAgent Developers Blog

                        はじめまして、CyberAgent AI Lab Intaractive Agentチームの技術研究員の大平といいます。 この記事は CyberAgent Developers Advent Calendar 2023 1日目の記事です。 ChatGPTの登場以降、自然なチャット対話はAPI呼び出しだけで簡単に実装できるようになりました。 更に人間のようなインタラクションを実現しようとすれば、音声対話に発展させたいと思う方も多いかと思われます。 しかし実際にLLMを使って音声対話システムを構築してみると、そのレスポンスの遅さに不満を感じることになります。 この記事ではよくあるシンプルなLLMを用いた音声対話に対していくつかの工夫を施し、その応答速度をできるだけ早めてみようという試みになります。 よくある構成として、以下を用います。 音声認識 Google STT LLM ChatGPT 3

                          LLM音声対話システムの応答を高速化してみた | CyberAgent Developers Blog
                        • 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
                          • python_modules.pdf

                            Python3 OpenCV / Pillow / pygame / Eel / PyDub / NumPy / matplotlib / SciPy / SymPy / gmpy2 / hashlib, passlib / Cython / Numba / ctypes / PyInstaller / curses / tqdm / JupyterLab / json / psutil / urllib / zenhan / jaconv Copyright © 2017-2025, Katsunori Nakamura 2025 8 19 Python ‘ .py’ Python Python Windows PSF Python py .py Enter macOS Linux PSF Python python3 .py Enter Anaconda Prompt Python p

                            • 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

                              • 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

                                • January 2024 (version 1.86)

                                  Version 1.106 is now available! Read about the new features and fixes from October. Update 1.86.2: The update addresses these issues. Update 1.86.1: The update addresses these issues. Downloads: Windows: x64 Arm64 | Mac: Universal Intel silicon | Linux: deb rpm tarball Arm snap Welcome to the January 2024 release of Visual Studio Code. There are many updates in this version that we hope you'll lik

                                    January 2024 (version 1.86)
                                  • 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

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

                                      • AWSとRubyは相性が良いと思う話 - エニグモ開発者ブログ

                                        こんにちは、インフラエンジニアの 高山 です。 この記事は Enigmo Advent Calendar 2022 の25日目の記事です。 はじめに エニグモ入社後に AWSを徐々に触れ始め 数年経過しました。 最初はWebコンソールからポチポチしていたのですが、CloudFormationでコード化を進めたり AWSCLIやSDKを使うようになり、最近は Rubyで AWSリソースの情報取得や操作をすることが多くなってきました。 (以下、RubyでAWSリソースの情報取得や操作をすることをAWSをRubyで操作すると表現します) AWSをRubyで操作するようになった理由は以下です。 そもそもWebコンソールは苦手(というより怖い)で、CLIで操作したい派である 構造的なデータを扱うのは Shellスクリプトだと厳しい(jqが嫌い) Ruby on Rails(以下、Railsと表記しま

                                          AWSとRubyは相性が良いと思う話 - エニグモ開発者ブログ
                                        • Rust on MIPS64 Windows NT 4.0

                                          Introduction Some part of me has always been fascinated with coercing code to run in weird places. I scratch this itch a lot with my security research projects. These often lead me to writing shellcode to run in kernels or embedded hardware, sometimes with the only way being through an existing bug. For those not familiar, shellcode is honestly hard to describe. I don’t know if there’s a very form

                                            Rust on MIPS64 Windows NT 4.0
                                          • 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?
                                            • 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

                                              • Amazon FSx for NetApp ONTAPファイルシステム上のiSCSI LUNをマウントしてみた | DevelopersIO

                                                Amazon FSx for NetApp ONTAPは単純なファイルサーバーじゃないぞ こんにちは、のんピ(@non____97)です。 皆さんはMulti-AZのEBSボリュームを欲しいなと思ったことはありますか? 私はあります。 EBSボリュームはAZ単位なのでAZ障害のことを考えるとちょっと心配です。かと言って自分でブロックレベルのレプリケーションを実装するのも何だか大変です。 そこで、Amazon FSx for NetApp ONTAPの出番です。 Amazon FSx for NetApp ONTAPはファイルサーバーとしての機能だけではなく、ブロックストレージとしての機能も有しています。 Q: Amazon FSx for NetApp ONTAP はどのプロトコルをサポートしていますか? A: Amazon FSx for NetApp ONTAP は、ネットワークファイ

                                                  Amazon FSx for NetApp ONTAPファイルシステム上のiSCSI LUNをマウントしてみた | DevelopersIO
                                                • 同時タイムラプスのGUIをpythonでつくってみた - Qiita

                                                  import PySimpleGUI as sg import datetime import time import os import numpy as np import cv2 import glob from time import sleep mport schedule import mojimoji import sys # class def cam_2(create_directory1,create_directory2): # global create_directory1 cap1 = cv2.VideoCapture(1,cv2.CAP_DSHOW) time.sleep(1) cap1.set(cv2.CAP_PROP_EXPOSURE,-6) ret1, frame1 = cap1.read() print(ret1) if ret1 == False:

                                                    同時タイムラプスのGUIをpythonでつくってみた - Qiita
                                                  • 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

                                                    • 【AI Shift Advent Calendar 2024】MCP ClientをOpenAIモデルで実装する | 株式会社AI Shift

                                                      こんにちは、AIチームの二宮です。 この記事は AI Shift Advent Calendar 2024の14日目の記事です。 はじめに Model Context Protocol (MCP)とは、Anthropicから公開されたOSSで、LLMがさまざまなツールやリソースを活用するための標準プロトコルです。MCPはClaude以外のモデルでも利用できるように設計されています。そこで、今回はOpenAIのモデルを用いたMCP Clientを実装してみます。 MCPの実装は、Anthropicが公開しているTutorialが非常にわかりやすいので、そちらを進めていただくことをおすすめします。特に今回はQuickstartでのMCP Serverの実装と、Building MCP clientsでのMCP Clientの実装を終えた状態から始めます。ディレクトリ構成は以下のようになっていま

                                                        【AI Shift Advent Calendar 2024】MCP ClientをOpenAIモデルで実装する | 株式会社AI Shift
                                                      • Julia 1.6: what has changed since Julia 1.0?

                                                        Julia 1.0 came out well over 2 years ago. Since then a lot has changed and a lot hasn’t. Julia 1.0 was a commitment to no breaking changes, but that is not to say no new features have been added to the language. Julia 1.6 is a huge release and it is coming out relatively soon. RC-1 was released recently. I suspect we have at least a few more weeks before the final release. The Julia Core team take

                                                        • Writing Pong in Rust for my OS Written in Rust – Stephen Marz

                                                          This post is part of a larger effort you can view over here: https://osblog.stephenmarz.com. Pong being played on my custom, RISC-V OS in Rust! Video Contents OverviewApplication Programmer’s Interface (API)Starting RoutinesSystem CallsDrawing PrimitivesEvent HandlingStart Our GameGame LoopPLAY Overview We last left off writing a graphics driver and an event driver for our operating system. We als

                                                          • Range Over Function Types - The Go Programming Language

                                                            Range over function types is a new language feature in the Go 1.23 release. This blog post will explain why we are adding this new feature, what exactly it is, and how to use it. Why? Since Go 1.18 we’ve had the ability to write new generic container types in Go. For example, let’s consider this very simple Set type, a generic type implemented on top of a map. // Set holds a set of elements. type

                                                              Range Over Function Types - The Go Programming Language
                                                            • Flipping Pages: An analysis of a new Linux vulnerability in nf_tables and hardened exploitation techniques

                                                              This blogpost is the next instalment of my series of hands-on no-boilerplate vulnerability research blogposts, intended for time-travellers in the future who want to do Linux kernel vulnerability research. Specifically, I hope beginners will learn from my VR workflow and the seasoned researchers will learn from my techniques. In this blogpost, I'm discussing a bug I found in nf_tables in the Linux

                                                              • Reasons I still love the fish shell

                                                                September 12, 2024 I wrote about how much I love fish in this blog post from 2017 and, 7 years of using it every day later, I’ve found even more reasons to love it. So I thought I’d write a new post with both the old reasons I loved it and some reasons. This came up today because I was trying to figure out why my terminal doesn’t break anymore when I cat a binary to my terminal, the answer was “fi

                                                                • LambdaLisp - A Lisp Interpreter That Runs on Lambda Calculus

                                                                  LambdaLisp is a Lisp interpreter written as an untyped lambda calculus term. The input and output text is encoded into closed lambda terms using the Mogensen-Scott encoding, so the entire computation process solely consists of the beta-reduction of lambda calculus terms. When run on a lambda calculus interpreter that runs on the terminal, it presents a REPL where you can interactively define and e

                                                                    LambdaLisp - A Lisp Interpreter That Runs on Lambda Calculus
                                                                  • Implement tcl in tcl

                                                                    Maybe someone has already done this. But the question in my mind is how much of Tcl can be implimented in Tcl itself. Obviously you can't implement system calls in Tcl, but you could implement just about everthing else. What commands/parts of Tcl would be in the minimal set? Earl Johnson Minimal set"set" both scalar and array modes."eval" command"unknown" "string index" command"string length" comm

                                                                    • 【IICS】GitHub Actionsを使用したIICS JOB自動テスト | DevelopersIO

                                                                      はじめに データアナリティクス事業本部ビッグデータチームのyosh-kです。 今回はIICS CDIでリソースをGithubで管理し、チェックインした際にGithub ActionsでIICS JOBを自動テストすることが可能か検証していきたいと思います。 前提条件 以下の動画や記事などで紹介されていた内容を元に検証と実装を一部修正させていただきました。 Automated Deployment of IICS Assets- CI/CD using Informatica API's 事前に任意のマッピングタスク、マッピング、タスクフローを作成してあることとします。 また、IICS CDIとGithubでのソース管理が設定されていることとします。まだの場合は、以下のブログを参考にしてください。 Informatica Cloud Data IntegrationでGitHub上のリポジト

                                                                        【IICS】GitHub Actionsを使用したIICS JOB自動テスト | DevelopersIO
                                                                      • Scheduling Internals

                                                                        A sneak peek to what's coming! I remember when I first learned that you can write a server handling millions of clients running on just a single thread, my mind was simply blown away 🤯 I used Node.js while knowing it is single threaded, I used async / await in Python, and I used threads, but never asked myself "How is any of this possible?". This post is written to spread the genius of concurrenc

                                                                          Scheduling Internals
                                                                        • Webアプリケーションを自動で操作してみよう | へっぽこ実験ブログ

                                                                          自動操作を行う場合、id、name、classなどを利用して要素を指定することになるので、属性値をメモしておきましょう。 5.同様にボタンについても属性を調べます。その結果は以下のようになります。 <input class="gNO89b" value="Google 検索" aria-label="Google 検索" name="btnK" type="submit" data-ved="0ahUKEwiC0u6iu4nlAhXwyIsBHWwTBHcQ4dUDCAo"> 属性 値 ここで調べた属性を利用して要素を特定して自動操作を行うことになります。。 また、今回はChromeでのやり方を紹介しましたが、他のブラウザでも同様のことが可能です。同じWebアプリケーションを使用していてもブラウザによって出力される内容が異なる可能性もあるので、自動操作を行うブラウザを使用して要素を調べるよ

                                                                            Webアプリケーションを自動で操作してみよう | へっぽこ実験ブログ
                                                                          • Fitting a Forth in 512 bytes

                                                                            Fitting a Forth in 512 bytes June 10, 2021 · 31 minute read This article is part of the Bootstrapping series, in which I start from a 512-byte seed and try to bootstrap a practical system. Software is full of circular dependencies if you look deep enough. Compilers written in the language they compile are the most obvious example, but not the only one. To compile a kernel, you need a running kerne

                                                                              Fitting a Forth in 512 bytes
                                                                            1