並び順

ブックマーク数

期間指定

  • から
  • まで

1 - 40 件 / 531件

新着順 人気順

python for in if syntaxの検索結果1 - 40 件 / 531件

  • Command Line Interface Guidelines

    Contents Command Line Interface Guidelines An open-source guide to help you write better command-line programs, taking traditional UNIX principles and updating them for the modern day. Authors Aanand Prasad Engineer at Squarespace, co-creator of Docker Compose. @aanandprasad Ben Firshman Co-creator Replicate, co-creator of Docker Compose. @bfirsh Carl Tashian Offroad Engineer at Smallstep, first e

      Command Line Interface Guidelines
    • 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
      • PDFを高品質なマークダウンに変換する方法|すぅ | AI駆動PM

        PDFファイルをマークダウンに変換する作業って、地味だけど本当に大切な作業ですよね。 「また手作業でコピペか...」 「レイアウトが崩れてる...」 「表がめちゃくちゃになってる...」 私もさまざまな文書管理の現場で同じような課題に直面してきました。特に、既存のPDF資料をObisidianやNotionなどのマークダウン形式で管理したい場面って、本当に多いですよね。 手作業でやると、一つの文書だけで数時間かかることもあります。表や画像の配置を調整して、リンクを張り直して、フォーマットを整えて...。骨が折れる作業です。 「もっと効率的な方法はないだろうか?」 そう思っていた矢先、いくつかの優秀な手法を発見しました。今回は、スキルレベル別に4つのアプローチをご紹介したいと思います。 【各レベルの概要】まず、それぞれのアプローチの特徴を簡単にご紹介しておきますね。 レベル1:GPT-5でシ

          PDFを高品質なマークダウンに変換する方法|すぅ | AI駆動PM
        • A Visual Guide to SSH Tunnels: Local and Remote Port Forwarding

          Bridge vs. Switch: What I Learned From a Data Center TourNetworking Lab: Ethernet Broadcast DomainsNetworking Lab: L3 to L2 Segments MappingNetworking Lab: Simple VLANDon't miss new posts in the series! Subscribe to the blog updates and get deep technical write-ups on Cloud Native topics direct into your inbox. TL;DR SSH Port Forwarding as a printable cheat sheet. SSH is yet another example of an

            A Visual Guide to SSH Tunnels: Local and Remote Port Forwarding
          • とほほのHaskell入門 - とほほのWWW入門

            概要 Haskellとは 関数型言語 純粋関数型言語 インストール Haskell Stack Hello world 基本 予約語 コメント ブロック レイアウト 入出力 型 変数 数値 文字(Char) 文字列(String) エスケープシーケンス リスト([...]) タプル((...)) 演算子 関数 演算子定義 再帰関数 ラムダ式 パターンマッチ ガード条件 関数合成(.) 引数補足(@) 制御構文 do文 let文 if文 case文 where文 import文 ループ データ型 データ型(列挙型) データ型(タプル型) データ型(直和型) 新型定義 (newtype) 型シノニム (type) 型クラス (class) メイビー(Maybe) ファンクタ(Functor) アプリケイティブ(Applicative) モナド(Monad) モジュール (module) 高階関

            • 関数名、メソッド名、変数名でよく使う英単語のまとめ

              プログラミングをしていると関数名、メソッド名、変数名をどうするか悩みます。 ロジックより命名に時間を費やすこともざらにあります。翻訳したり、一般的な命名規則なのかいつも検索して大変です。 よく使うサイトの内容をコピってメモしておく 関数名とメソッド名の違いについて よく使う英単語のまえに、いつもごっちゃにして使っているけど、定義はこんな感じ 「関数」と「メソッド」の違い 似ているところ どちらも何か(引数)を入れると処理をして何か(戻り値)を返してくれます。 違うところ やってること自体は大差ありません。概念としては違います。 メソッドはオブジェクト指向で登場する用語で、オブジェクトの動作を定義したものです。 まずオブジェクトありきなのですね。一方の関数は、オブジェクト云々は関係ありません。 個人的な使い分け Java で登場する関数は「メソッド」です。C 言語で登場する関数は「関数」と呼

                関数名、メソッド名、変数名でよく使う英単語のまとめ
              • 【2020年】CTF Web問題の攻撃手法まとめ - こんとろーるしーこんとろーるぶい

                はじめに 対象イベント 読み方、使い方 Remote Code Execution(RCE) 親ディレクトリ指定によるopen_basedirのバイパス PHP-FPMのTCPソケット接続によるopen_basedirとdisable_functionsのバイパス JavaのRuntime.execでシェルを実行 Cross-Site Scripting(XSS) nginx環境でHTTPステータスコードが操作できる場合にCSPヘッダーを無効化 GoogleのClosureLibraryサニタイザーのXSS脆弱性 WebのProxy機能を介したService Workerの登録 括弧を使わないXSS /記号を使用せずに遷移先URLを指定 SOME(Same Origin Method Execution)を利用してdocument.writeを順次実行 SQL Injection MySQ

                  【2020年】CTF Web問題の攻撃手法まとめ - こんとろーるしーこんとろーるぶい
                • ChatGPT APIを取り巻くライブラリ 〜LangChainとguidanceの紹介 | gihyo.jp

                  こんにちは! 逆瀬川(@gyakuse)です! 前回はOpenAIが公開しているChat APIとWhisper APIを用いて議事録文字起こしアプリケーションを作ってみました。今回は、Chat APIを便利に使うためのライブラリであるLangChainとguidanceを紹介していきます。 なぜ便利に使うためのライブラリが必要なのか? 単純にChat APIにリクエストを送るだけであれば、各言語に用意されたライブラリを使うだけで良いでしょう。たとえば、Pythonにおいてはopenai-pythonが用意されています。前回紹介したとおり、Chat APIを使うだけなら以下のようなリクエストを作るだけで済みます。 import openai openai.api_key = "sk-..." # APIキー completion = openai.ChatCompletion.create

                    ChatGPT APIを取り巻くライブラリ 〜LangChainとguidanceの紹介 | gihyo.jp
                  • コーディングエージェントの能力を拡張する Serena を試してみた

                    LSP を活用してセマンティックなコード検索・編集能力を提供する MCP サーバー Serena の導入・使用方法を紹介。Claude Code でのオンボーディングからリファクタリングまでの実践的な活用例を解説します。 Serena はセマンティックなコード検索・編集能力を追加するオープンソースのツールキットです。MCP(Model Context Protocol) サーバーとして動作しているため、Claude Code や Cursor, VS Code のように MCP に対応しているクライアントであれば利用できます。またエージェントフレームワークとして Agno を使用しているため、特定の LLM モデルに依存せずに動作します。 Serena は LSP(Language Server Protocol)を使用してセマンティックなコードを解析するのが特徴です。LSP はコードの構

                      コーディングエージェントの能力を拡張する Serena を試してみた
                    • textlint - Linterの作り方

                      [fit] textlint - Linterの作り方 自己紹介 Name : azu Twitter : @azu_re Website: Web scratch, JSer.info Book: JavaScript Primer アジェンダ Linterを作る人向けの話 Linterの考え方とアーキテクチャを一致させる 使うものを作ろう、作るために使おう textlint とは 自然言語(日本語や英語など)に対するLinter MarkdownやHTMLなどのマークアップ言語に対応している ビルトインのルールは0 利用できるルールは100以上ある 多くのルールはオフラインで動くので、外部に入力してる内容を送信しない CI/CDに組み込める自然言語のチェッカー(表記揺れ、スペルチェック、誤用、読みやすさのチェックなど) textlint users Translation: Angul

                      • Building a toy browser

                        In the last several weeks, I have been building a toy browser based on an online book, Web Browser Engineering. As someone who spent a fair share of his career on web frontend, it was eye-opening and satisfying. It felt like I had been living on one side of a wall for years and finally visited the other side of the wall. I imagine other web frontend folks would like it as well. The book Web Browse

                          Building a toy browser
                        • vscode.dev(!)

                          Join a VS Code Dev Days event near you to learn about AI-assisted development in VS Code. October 20, 2021 by Chris Dias, @chrisdias Back in 2019, when the .dev top-level domain opened, we picked up vscode.dev and quickly parked it, pointing at our website code.visualstudio.com (or, if you are from the Boston area like me, we "pahked it"). Like a lot of people who buy a .dev domain, we had no idea

                            vscode.dev(!)
                          • Python普及しろ協会に入会したい

                            この記事はタナイ氏によるPython滅ぼす協会に入会したいを読んでから執筆したものです。 この記事の趣旨はPython滅ぼす協会に入会したいに対する反論という形をとりながら、タナイ氏により「バカの言語」と揶揄され、「使ってエンジニアを名乗るというのは」「滑稽」とまで言われたPythonの立場を再考することです。 追記 本記事は「Pythonはこれだけ優れた言語だからみんな使おう!」というものではなく「言うほど酷くないと思うよ」程度のものです。 型アノテーションがあるからと言って静的型付けを軽視しているわけでもなければ、map関数をもってmapメソッドを不要だと言っているわけでもありません。 この記法は嫌い〜この記法が好き〜と表明することは個人の自由ですが、同様に「この記法は実はこういう意味があって〜」という意見があればそれを聞いた上で、物事を判断して欲しいです。もちろん、聞いても意見が変わ

                              Python普及しろ協会に入会したい
                            • Announcing Python in Excel

                              (September 16, 2024) UPDATE: Python in Excel is now generally available for Windows users of Microsoft 365 Business and Enterprise.  Read our latest announcement here. Since its inception, Microsoft Excel has changed how people organize, analyze, and visualize their data, providing a basis for decision-making for the millions of people who use it each day. Today we’re announcing a significant evol

                                Announcing Python in Excel
                              • 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
                                • プロと読み解く Ruby 3.1 NEWS - クックパッド開発者ブログ

                                  技術部の笹田(ko1)と遠藤(mame)です。クックパッドで Ruby (MRI: Matz Ruby Implementation、いわゆる ruby コマンド) の開発をしています。お金をもらって Ruby を開発しているのでプロの Ruby コミッタです。 本日 12/25 に、ついに Ruby 3.1.0 がリリースされました(Ruby 3.1.0 リリース )。今年も Ruby 3.1 の NEWS.md ファイルの解説をします。NEWS ファイルとは何か、は以前の記事を見てください。 プロと読み解く Ruby 2.6 NEWS ファイル - クックパッド開発者ブログ プロと読み解くRuby 2.7 NEWS - クックパッド開発者ブログ プロと読み解くRuby 3.0 NEWS - クックパッド開発者ブログ 本記事は新機能を解説することもさることながら、変更が入った背景や苦労な

                                    プロと読み解く Ruby 3.1 NEWS - クックパッド開発者ブログ
                                  • Welcome to Comprehensive Rust 🦀 - Comprehensive Rust 🦀

                                    Welcome to Comprehensive Rust 🦀 This is a free Rust course developed by the Android team at Google. The course covers the full spectrum of Rust, from basic syntax to advanced topics like generics and error handling. The latest version of the course can be found at https://google.github.io/comprehensive-rust/. If you are reading somewhere else, please check there for updates. The course is availab

                                    • 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
                                      • New for AWS Lambda – Container Image Support | Amazon Web Services

                                        AWS News Blog New for AWS Lambda – Container Image Support February 9, 2021: Post updated with the current regional availability of container image support for AWS Lambda. With AWS Lambda, you upload your code and run it without thinking about servers. Many customers enjoy the way this works, but if you’ve invested in container tooling for your development workflows, it’s not easy to use the same

                                          New for AWS Lambda – Container Image Support | Amazon Web Services
                                        • 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
                                          • GPT-5 の新パラメータとツール|npaka

                                            以下の記事が面白かったので、簡単にまとめました。 ・GPT-5 New Params and Tools - OpenAI Cookbook 1. verbosity1-1. 概要「verbosity」は、出力トークン数を調節できます。 ・low : 簡潔なUX、簡潔な文章 ・medium (デフォルト) : バランスの取れた詳細 ・high : 詳細な情報。監査、教育、引き継ぎに最適 1-2. verbosityの効果の確認プロンプトを一定に保ったまま、「verbosity」を変更することで、効果を確認できます。 response = client.responses.create( model="gpt-5", input="人生、宇宙、そして万物に関する究極の問いに対する答えは何でしょうか?", text={ "verbosity": "low" } ) print(response

                                              GPT-5 の新パラメータとツール|npaka
                                            • vscode.dev(!)

                                              Join a VS Code Dev Days event near you to learn about AI-assisted development in VS Code. October 20, 2021 by Chris Dias, @chrisdias Back in 2019, when the .dev top-level domain opened, we picked up vscode.dev and quickly parked it, pointing at our website code.visualstudio.com (or, if you are from the Boston area like me, we "pahked it"). Like a lot of people who buy a .dev domain, we had no idea

                                                vscode.dev(!)
                                              • プロと読み解くRuby 3.4 NEWS - STORES Product Blog

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

                                                  プロと読み解くRuby 3.4 NEWS - STORES Product Blog
                                                • 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
                                                    • OOP: the worst thing that happened to programming

                                                      > BTC: bc1qs0sq7agz5j30qnqz9m60xj4tt8th6aazgw7kxr ETH: 0x1D834755b5e889703930AC9b784CB625B3cd833E USDT(Tron): TPrCq8LxGykQ4as3o1oB8V7x1w2YPU2o5n Ton: UQAtBuFWI3H_LpHfEToil4iYemtfmyzlaJpahM3tFSoxomYQ Doge: D7GMQdKhKC9ymbT9PtcetSFTQjyPRRfkwTdismiss OOP: the worst thing that happened to programming [2/24/2025] In this article, we will try to understand why OOP is the worst thing that happened to prog

                                                        OOP: the worst thing that happened to programming
                                                      • Fish 4.0: The Fish Of Theseus

                                                        About two years ago, our head maintainer @ridiculousfish opened what quickly became our most-read pull request: #9512 - Rewrite it in Rust Truth be told, we did not quite expect that to be as popular as it was. It was written as a bit of an in-joke for the fish developers first, and not really as a press release to be shared far and wide. We didn’t post it anywhere, but other people did, and we go

                                                        • GitHub - gristlabs/grist-core: Grist is the evolution of spreadsheets.

                                                          Grist is a modern relational spreadsheet. It combines the flexibility of a spreadsheet with the robustness of a database. grist-core (this repo) has what you need to run a powerful server for hosting spreadsheets. grist-desktop is a Linux/macOS/Windows desktop app for viewing and editing spreadsheets stored locally. grist-static is a fully in-browser build of Grist for displaying spreadsheets on a

                                                            GitHub - gristlabs/grist-core: Grist is the evolution of spreadsheets.
                                                          • research!rsc: Coroutines for Go

                                                            This post is about why we need a coroutine package for Go, and what it would look like. But first, what are coroutines? Every programmer today is familiar with function calls (subroutines): F calls G, which stops F and runs G. G does its work, potentially calling and waiting for other functions, and eventually returns. When G returns, G is gone and F continues running. In this pattern, only one fu

                                                            • Amazon Linux 2023がGAされました | DevelopersIO

                                                              抜粋 : Release cadence - Amazon Linux 2023 メジャーリリースとマイナーリリースの内容は以下AWS公式ドキュメントに記載されています。メジャーリリース時には互換性があるか十分に検証した上でアップデートしましょう。 Major version release— Includes new features and improvements in security and performance across the stack. The improvements might include major changes to the kernel, toolchain, Glib C, OpenSSL, and any other system libraries and utilities. Major releases of Amazon Linux ar

                                                                Amazon Linux 2023がGAされました | DevelopersIO
                                                              • Introducing Ezno

                                                                Ezno is an experimental compiler I have been working on and off for a while. In short, it is a JavaScript compiler featuring checking, correctness and performance for building full-stack (rendering on the client and server) websites. This post is just an overview of some of the features I have been working on which I think are quite cool as well an overview on the project philosophy ;) It is still

                                                                  Introducing Ezno
                                                                • BigQuery Scriptingの便利な使い方をまとめてみた - yasuhisa's blog

                                                                  背景 & Disclaimer 自分自身はこれまでBigQuery Scriptingをほぼ使っていませんでした BigQuery自体は3年くらいの利用歴 SQL単発で済ませるのが苦しそうな場合は、Pythonなどのプログラミング言語 + ワークフローエンジンの組み合わせで戦っており、自分としては特に困っていなかった 社内で他の方が使うケースをぼちぼち見ることがある 自分は困っていなくても、社内のBigQueryユーザーでBigQuery Scriptingを使っていて困っている人がそれなりにいる 著者はそれなりのBigQueryユーザーがいる企業のデータ基盤の人間です さすがに「使ったことないので、分からないですねー」で済ませるわけにはいかなくなってきた そもそもどんなユースケースで便利なのかすらも分かっていない状態なので、便利そうに思える場合をまとめてみることにしました というわけで、

                                                                    BigQuery Scriptingの便利な使い方をまとめてみた - yasuhisa's blog
                                                                  • Mojo may be the biggest programming language advance in decades – fast.ai

                                                                    I remember the first time I used the v1.0 of Visual Basic. Back then, it was a program for DOS. Before it, writing programs was extremely complex and I’d never managed to make much progress beyond the most basic toy applications. But with VB, I drew a button on the screen, typed in a single line of code that I wanted to run when that button was clicked, and I had a complete application I could now

                                                                      Mojo may be the biggest programming language advance in decades – fast.ai
                                                                    • GitHub - AUTOMATIC1111/stable-diffusion-webui: Stable Diffusion web UI

                                                                      Detailed feature showcase with images: Original txt2img and img2img modes One click install and run script (but you still must install python and git) Outpainting Inpainting Color Sketch Prompt Matrix Stable Diffusion Upscale Attention, specify parts of text that the model should pay more attention to a man in a ((tuxedo)) - will pay more attention to tuxedo a man in a (tuxedo:1.21) - alternative

                                                                        GitHub - AUTOMATIC1111/stable-diffusion-webui: Stable Diffusion web UI
                                                                      • 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 Parser開発日誌 (1) - かねこにっき

                                                                          Error Tolerant parserに関するアイデア 9月半ばに行われたRubyKaigi 2022以来、3ヶ月くらいError Tolerant parserについて調べたり考えたり実装をしたりしています。 途中でもいいからなにかにアウトプットしておくとよいというアドバイスをもらったので、今現在の状況や考えていることを書いておこうと思います。 Error Tolerant parserとは? どうしてそれが欲しいの? 通常parserはユーザーの入力を受け取り その入力がそのプログラミング言語にとって、validなものか否かをチェック validな場合、その後の工程にとって都合のいいデータ構造(例えばAST)に変換し、後工程に渡す invalidな場合、Syntax Errorをレポートする といった処理を行います。 しかしIDEやLSP(Language Server Proto

                                                                            Ruby Parser開発日誌 (1) - かねこにっき
                                                                          • GitHub Actions を静的検査するツールの紹介 (actionlint/ghalint/zizmor)

                                                                            先日、 tj-actions/changed-files や reviewdog/action-* などのアクションの Git タグが書き換えられるという出来事がありました。 これにより、これらのアクションを Git タグで参照している GitHub Actions Workflow 内で悪意のあるコードが実行されてしまうという事態が発生しました。 このような事態を防ぐためには、アクションの参照には Git タグではなくコミットハッシュを使用するなどの対策が必要です。 # ❌ Git タグは書き換えられる可能性がある - uses: actions/checkout@v4 - uses: actions/checkout@v4.2.2 # ⭕ コミットハッシュを指定しておけば Git タグが書き換えられても影響を受けない - uses: actions/checkout@11bd71901

                                                                              GitHub Actions を静的検査するツールの紹介 (actionlint/ghalint/zizmor)
                                                                            • Introducing Amazon S3 Object Lambda – Use Your Code to Process Data as It Is Being Retrieved from S3 | Amazon Web Services

                                                                              AWS News Blog Introducing Amazon S3 Object Lambda – Use Your Code to Process Data as It Is Being Retrieved from S3 March 15, 2023 – You can now use S3 Object Lambda with Amazon CloudFront to tailor content for end users. August 13, 2024 – Added a note clarifying that, when following the walkthrough, you should not mark the Specify Lambda function version option that was added after this post was p

                                                                                Introducing Amazon S3 Object Lambda – Use Your Code to Process Data as It Is Being Retrieved from S3 | Amazon Web Services
                                                                              • An Opinionated Guide to xargs

                                                                                Preliminaries What Is xargs? It's an adapter between text streams and argv arrays, two essential concepts in shell. You pass it flags that specify how to split stdin. Then it generates arguments and invokes processes. Example: $ echo 'alice bob' | xargs -n 1 -- echo hi hi alice hi bob What's happening here? xargs splits the input stream on whitespace, producing 2 arguments, alice and bob. We passe

                                                                                • Your URL Is Your State

                                                                                  Couple of weeks ago when I was publishing The Hidden Cost of URL Design I needed to add SQL syntax highlighting. I headed to PrismJS website trying to remember if it should be added as a plugin or what. I was overwhelmed with the amount of options in the download page so I headed back to my code. I checked the file for PrismJS and at the top of the file, I found a comment containing a URL: /* http