並び順

ブックマーク数

期間指定

  • から
  • まで

1 - 40 件 / 300件

新着順 人気順

python if and else programの検索結果1 - 40 件 / 300件

  • 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
    • This is The Entire Computer Science Curriculum in 1000 YouTube Videos

      This is The Entire Computer Science Curriculum in 1000 YouTube Videos In this article, we are going to create an entire Computer Science curriculum using only YouTube videos. The Computer Science curriculum is going to cover every skill essential for a Computer Science Engineer that has expertise in Artificial Intelligence and its subfields, like: Machine Learning, Deep Learning, Computer Vision,

        This is The Entire Computer Science Curriculum in 1000 YouTube Videos
      • 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
        • 【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問題の攻撃手法まとめ - こんとろーるしーこんとろーるぶい
          • MCP(Model Context Protocol)を活用したJグランツ補助金検索システムの実装例|デジタル庁

            デジタル庁プロダクトマネージャーユニットの土岐竜一です。事業者の手続システム総括班で、Jグランツを含む事業者向けシステムなどを担当しています。 この記事では、デジタル庁が運用する補助金電子申請システム「Jグランツ」のAPIを、Anthropic社が提唱するModel Context Protocol(MCP) によりラッピングし、LLMから利用可能なシステムのサンプル設計および実装について説明します。 具体的には、Pythonで簡単に実装できるFastMCPフレームワークを利用し、Jグランツの補助金検索や詳細の取得などの実用的な機能を備えたMCPサーバーを例として実装します。なお、本記事におけるコードはGitHubよりダウンロード可能です。 本実装例で実現できること今回紹介するMCPサーバーを利用すると、LLM(Claudeなど)を通じて、以下のような自然言語によるJグランツの補助金検索や

              MCP(Model Context Protocol)を活用したJグランツ補助金検索システムの実装例|デジタル庁
            • 防衛省サイバーコンテスト 2025 writeup - st98 の日記帳 - コピー

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

                防衛省サイバーコンテスト 2025 writeup - st98 の日記帳 - コピー
              • 大実験!ChatGPTは競プロの問題を解けるのか (2024年5月版) - E869120's Blog

                1. はじめに 2024 年 5 月 14 日、OpenAI 社から新たな生成 AI「GPT-4o」が発表され、世界に大きな衝撃を与えました。これまでの GPT-4 よりも性能を向上させただけでなく1、音声や画像のリアルタイム処理も実現し、さらに応答速度が大幅に速くなりました。「ついにシンギュラリティが来てしまったか」「まるで SF の世界を生きているような感覚だ」という感想も見受けられました。 しかし、いくら生成 AI とはいえ、競技プログラミングの問題を解くのは非常に難しいです。なぜなら競技プログラミングでは、問題文を理解する能力、プログラムを実装する能力だけでなく、より速く答えを求められる解法 (アルゴリズム) を考える能力も要求されるからです。もし ChatGPT が競技プログラミングを出来るようになれば他のあらゆるタスクをこなせるだろう、と考える人もいます。 それでは、現代最強の

                  大実験!ChatGPTは競プロの問題を解けるのか (2024年5月版) - E869120's Blog
                • 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
                  • 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

                    • Docker is deleting Open Source organisations - what you need to know

                      Coming up with a title that explains the full story here was difficult, so I'm going to try to explain quickly. Yesterday, Docker sent an email to any Docker Hub user who had created an "organisation", telling them their account will be deleted including all images, if they do not upgrade to a paid team plan. The email contained a link to a tersely written PDF (since, silently edited) which was mi

                        Docker is deleting Open Source organisations - what you need to know
                      • Don't write clean code, write CRISP code — Bitfield Consulting

                        I’m sure we’re all in favour of “clean code”, but it’s one of those motherhood-and-apple-pie things that no one can reasonably disagree with. Who wants to write dirty code, unless maybe it’s for a porn site? The problem, of course, is that few of us can agree on what “clean code” means, and how to get there. A rule like “methods should only do one thing”, looks great on a T-shirt, but it’s not so

                          Don't write clean code, write CRISP code — Bitfield Consulting
                        • 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

                            • How I Hacked my Car

                              Note: As of 2022/10/25 the information in this series is slightly outdated. See Part 5 for more up to date information. The Car⌗ Last summer I bought a 2021 Hyundai Ioniq SEL. It is a nice fuel-efficient hybrid with a decent amount of features like wireless Android Auto/Apple CarPlay, wireless phone charging, heated seats, & a sunroof. One thing I particularly liked about this vehicle was the In-V

                              • NETGEAR社製ルーターにおける認証不要の任意コード実行の技術的解説(PSV-2022-0044) - GMO Flatt Security Blog

                                ※本記事は先立って公開された英語版記事を翻訳し、日本語圏の読者向けに一部改変したものです。 画像出典: https://www.netgear.com/business/wifi/access-points/wac124/ はじめに こんにちは、株式会社Flatt Securityのstypr(@stereotype32)です。 一昨年、日本のOSS製品で発見された0day脆弱性に関する技術解説をブログに書きました。 それ以来、私は様々な製品に多くの脆弱性を発見してきました。残念ながら私が見つけたバグのほとんどはすぐに修正されなかったので、今日まで私が見つけた、技術的に興味深い脆弱性の情報を共有する機会がありませんでした。 本記事では、NETGEAR社のWAC124(AC2000)ルーターにおいて、様々な脆弱性を発見し、いくつかの脆弱性を連鎖させて、前提条件なしに未認証ユーザーの立場からコ

                                  NETGEAR社製ルーターにおける認証不要の任意コード実行の技術的解説(PSV-2022-0044) - GMO Flatt Security Blog
                                • ULPを活用した電池駆動ESP32雨センサシステムを作る - The Negligible Lab

                                  はじめに 明けましておめでとうございます🐇 とうとう昨年(2022年)の記事がただの1件から増えることがないまま2023年を迎えてしまいました。令和も何ともう5年です。さらにはもう2月ですね。 さて,新型コロナウイルスの流行が始まってから,筆者はほぼ在宅勤務となっています。その仕事机はちょうどバルコニー*1に通じる窓の直近に位置しています。このバルコニーには洗濯物も干しているのですが,雨が降り始めてもすぐ近くに座っている筆者がそれに気付かず,洗濯物を濡らしてしまうことが多々ありました。雨滴を検知して雨の降り始めをお知らせしてくれるシステムがあれば…いや,自分で作るのだ…! そこで,雨が降り始めたらLINEに通知を送ってくれる雨センサシステムを製作します。 まずは図1,2に完成形を示します。 図1: ESP32マイコンによる雨センサシステム 図2: “素”のESP32マイコンを搭載する基板

                                    ULPを活用した電池駆動ESP32雨センサシステムを作る - The Negligible Lab
                                  • 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
                                    • GitHub Copilot Labsを使ってみた - Qiita

                                      GitHub Copilot Labsとは? VSCodeの拡張機能として、GitHub Copilot Labs をインストールすれば、コードの解説をしてくれたり、リファクタリングしてくれたり、バグを修正してくれたりと便利な機能がたくさんあります。 以前に筆者が書いた以下のようなChatGTPの拡張機能のようなものです。 公式ページより抜粋 GitHub Copilotの実験的なアプリケーションのためのVS Code拡張機能。 GitHub Copilotは、開発者向けの画期的なAIペアプログラマですが、私たちはコーディングの未来を探求し始めたばかりです。テクニカルプレビューの期間中、Copilotチームは提案の質を向上させ、安全機能を追加しました。しかし、Copilotがコード提案以外にも提供できる潜在的な助けを見るのは難しいことではありません。 本日、GitHub Copilot L

                                        GitHub Copilot Labsを使ってみた - Qiita
                                      • The End of Programming – Communications of the ACM

                                        The end of classical computer science is coming, and most of us are dinosaurs waiting for the meteor to hit. I came of age in the 1980s, programming personal computers such as the Commodore VIC-20 and Apple ][e at home. Going on to study computer science (CS) in college and ultimately getting a Ph.D. at Berkeley, the bulk of my professional training was rooted in what I will call “classical” CS: p

                                        • ソースコード & ドキュメントに対応したGraph RAGの実装(Tree-sitter + LightRAG)

                                          (module (function_definition (identifier) # ← ここに関数名「sample_func」が含まれます (parameters) (block (expression_statement (call (identifier) (argument_list (string)))))) (expression_statement (call (identifier) (argument_list)))) ノードが色々取れましたが、「function_definition」が関数、その子である「identifier」が関数名を表すため、 function_definition == 子ノード ==> identifier となっている箇所を探索すれば抽出できます(関数ではあっても「lambda」など異なる場合もあります)。 今回は上記のようにTree-si

                                            ソースコード & ドキュメントに対応したGraph RAGの実装(Tree-sitter + LightRAG)
                                          • 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
                                            • 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

                                              • Announcing WASIX · Blog · Wasmer

                                                Announcing WASIXWASIX extends the WASI proposal to build useful and productive applications today with full POSIX compatibility Today we are very excited to launch a new initiative that will start shaping the future of WebAssembly on both the browser and the server. WASI was announced about 4 years ago and was a great push to move the Wasm community forward. It got everyone so excited that even So

                                                  Announcing WASIX · Blog · Wasmer
                                                • 型安全かつシンプルなAgentフレームワーク「PydanticAI」の実装を解剖する - ABEJA Tech Blog

                                                  はじめに こちらはABEJAアドベントカレンダー2024 12日目の記事です。 こんにちは、ABEJAでデータサイエンティストをしている坂元です。最近はLLMでアプローチしようとしていたことがよくよく検証してみるとLLMでは難しいことが分かり急遽CVのあらゆるモデルとレガシーな画像処理をこれでもかというくらい詰め込んだパイプラインを実装することになった案件を経験して、LLMでは難しそうなことをLLM以外のアプローチでこなせるだけの引き出しとスキルはDSとしてやはり身に付けておくべきだなと思うなどしています(LLMにやらせようとしていることは大抵難しいことなので切り替えはそこそこ大変)。 とはいうものの、Agentの普及によってより複雑かつ高度な推論も出来るようになってきています。弊社の社内外のプロジェクト状況を見ていても最近では単純なRAG案件は減りつつあり、計画からアクションの実行、結果

                                                    型安全かつシンプルなAgentフレームワーク「PydanticAI」の実装を解剖する - ABEJA Tech Blog
                                                  • the peculiar case of japanese web design - sabrinas.space

                                                    the peculiar case of japanese web design a project that should not have taken 8 weeks how is japanese web design different? in this 2013 Randomwire blog post, the author (David) highlighted an intriguing discrepancy in Japanese design. While the nation is known abroad for minimalist lifestyles, their websites are oddly maximalist. The pages feature a variety of bright colours (breaking the 3 colou

                                                    • Every System is a Log: Avoiding coordination in distributed applications

                                                      Every System is a Log: Avoiding coordination in distributed applications How Restate works, Part 1Posted January 22, 2025 by Stephan Ewen and Jack Kleeman and Giselle van Dongen ‐ 13 min read Building resilient distributed applications remains a tough challenge. It should be possible to focus almost entirely on the business logic and the complexity inherent to the domain. Instead, you need to revi

                                                        Every System is a Log: Avoiding coordination in distributed applications
                                                      • Modern IDEs are magic. Why are so many coders still using Vim and Emacs? - Stack Overflow

                                                        Developers are a finicky bunch. Like a dog refusing to walk on wet grass, there always seemed to be a bit of resistance to changing up a routine. We love what we grew up with, be it Star Trek jokes, Vim, or Emacs. The origins of this war harken back to Usenet groups in the 1980s, a time when Vi and Emacs were the primary tools used for coding. Emacs, as we well know, is a “maze of twisty little pa

                                                          Modern IDEs are magic. Why are so many coders still using Vim and Emacs? - Stack Overflow
                                                        • Lessons from Writing a Compiler

                                                          The prototypical compilers textbook is: 600 pages on parsing theory. Three pages of type-checking a first-order type system like C. Zero pages on storing and checking the correctness of declarations (the “symbol table”). Zero pages on the compilation model, and efficiently implementing separate compilation. 450 pages on optimization and code generation. The standard academic literature is most use

                                                          • Tales of the M1 GPU - Asahi Linux

                                                            Hello everyone, Asahi Lina here!✨ marcan asked me to write an article about the M1 GPU, so here we are~! It’s been a long road over the past few months and there’s a lot to cover, so I hope you enjoy it! What’s a GPU?You probably know what a GPU is, but do you know how they work under the hood? Let’s take a look! Almost all modern GPUs have the same main components: A bunch of shader cores, which

                                                              Tales of the M1 GPU - Asahi Linux
                                                            • Functional programming is finally going mainstream

                                                              Functional programming is finally going mainstream Object-oriented and imperative programming aren’t going away, but functional programming is finding its way into more codebases. Klint Finley // July 12, 2022 Paul Louth had a great development team at Meddbase, the healthcare software company he founded in 2005. But as the company grew, so did their bug count. That’s expected, up to a point. More

                                                                Functional programming is finally going mainstream
                                                              • The Scary Thing About Automating Deploys - Engineering at Slack

                                                                Most of Slack runs on a monolithic service simply called “The Webapp”. It’s big – hundreds of developers create hundreds of changes every week. Deploying at this scale is a unique challenge. When people talk about continuous deployment, they’re often thinking about deploying to systems as soon as changes are ready. They talk about microservices and 2-pizza teams (~8 people). But what does continuo

                                                                • Interview with Ryan Dahl, Node.js & Deno creator by Evrone

                                                                  In an interview with Evrone, Ryan Dahl speaks about the main challenges in Deno, the future of JavaScript and TypeScript, and tells how he would have changed his approach to Node.js if he could travel back in time. We met with Ryan Dahl, the creator of Node.js, to discuss the origins of the platform, its impact on JavaScript, and his thoughts on its future. In the interview he also reflected on hi

                                                                    Interview with Ryan Dahl, Node.js & Deno creator by Evrone
                                                                  • Prototyping in Rust | corrode Rust Consulting

                                                                    Programming is an iterative process - as much as we would like to come up with the perfect solution from the start, it rarely works that way. Good programs often start as quick prototypes. The bad ones stay prototypes, but the best ones evolve into production code. Whether you’re writing games, CLI tools, or designing library APIs, prototyping helps tremendously in finding the best approach before

                                                                      Prototyping in Rust | corrode Rust Consulting
                                                                    • The New Internet: Tailscale's Vision for the Future of Connectivity

                                                                      Avery Pennarun is the CEO and co-founder of Tailscale. A version of this post was originally presented at a company all-hands. We don’t talk a lot in public about the big vision for Tailscale, why we’re really here. Usually I prefer to focus on what exists right now, and what we’re going to do in the next few months. The future can be distracting. But increasingly, I’ve found companies are startin

                                                                        The New Internet: Tailscale's Vision for the Future of Connectivity
                                                                      • Rewriting the Ruby parser

                                                                        At Shopify, we have spent the last year writing a new Ruby parser, which we’ve called YARP (Yet Another Ruby Parser). As of the date of this post, YARP can parse a semantically equivalent syntax tree to Ruby 3.3 on every Ruby file in Shopify’s main codebase, GitHub’s main codebase, CRuby, and the 100 most popular gems downloaded from rubygems.org. We recently got approval to merge this work into C

                                                                          Rewriting the Ruby parser
                                                                        • 第752回 RISC-VのシングルボードコンピューターであるVisionFive 2を使ってみる | gihyo.jp

                                                                          今回はStarFive Technology製のRISC-Vシングルボードコンピューター(SBC)であるVisionFive 2にDebianをインストールして、その性能を計測してみましょう。 RISC-VとVisionFive 2 RISC-V(りすく・ふぁいぶ)は今もっとも熱い命令セットアーキテクチャーです。2010年頃に生まれたRISC-Vは、オープンな規格という強みを活かしてどんどんエコシステムを構築し、今では様々な企業がRISC-Vに本格的に手を出す状況になっています。AMD64/Intel 64やARMには性能も普及度合いもまだまだ及びませんが、今の勢いを維持できれば近い将来その状況は変わってくるでしょう。 本連載でも2018年ぐらいから、RISC-Vの記事を何度か取り上げていました。 第505回:「オープン規格の新しい命令セットアーキテクチャRISC-V入門 ツールチェインを

                                                                            第752回 RISC-VのシングルボードコンピューターであるVisionFive 2を使ってみる | gihyo.jp
                                                                          • 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
                                                                            • Taming Floating-Point Sums | orlp.net

                                                                              Suppose you have an array of floating-point numbers, and wish to sum them. You might naively think you can simply add them, e.g. in Rust: fn naive_sum(arr: &[f32]) -> f32 { let mut out = 0.0; for x in arr { out += *x; } out } This however can easily result in an arbitrarily large accumulated error. Let’s try it out: naive_sum(&vec![1.0; 1_000_000]) = 1000000.0 naive_sum(&vec![1.0; 10_000_000]) = 1

                                                                              • Terminal colours are tricky

                                                                                Yesterday I was thinking about how long it took me to get a colorscheme in my terminal that I was mostly happy with (SO MANY YEARS), and it made me wonder what about terminal colours made it so hard. So I asked people on Mastodon what problems they’ve run into with colours in the terminal, and I got a ton of interesting responses! Let’s talk about some of the problems and a few possible ways to fi

                                                                                • Why Rust is the Future of Game Development | thefuntastic

                                                                                  Rust, not related to the video game also called Rust, is a promising systems programming language with novel features ideally suited for game development. Exposure and awareness within the game developer community, however, remains limited. In this post, I provide a gentle introduction to Rust and attempt to justify its place on your radar. A Short History Lesson​What is Rust, and where did it com