並び順

ブックマーク数

期間指定

  • から
  • まで

1 - 40 件 / 203件

新着順 人気順

if else program list in pythonの検索結果1 - 40 件 / 203件

  • 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
      • 【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問題の攻撃手法まとめ - こんとろーるしーこんとろーるぶい
        • CPUエミュレータをRustで自作する - Don't Repeat Yourself

          この記事は Rust Advent Calendar 2020 ならびに CyberAgent Developers Advent Calendar 25日目の記事です。 今年のはじめの頃になりますが、『CPUの創り方』という本に載っている TD4 という CPU を実装してみました。TD4 は「とりあえず動作するだけの4bit CPU」の略です。この本に載っている CPU エミュレータを実際に実装してみました。ただし、本書には GUI が載っていましたが、それは省略しました。 CPUの創りかた 作者:渡波 郁発売日: 2003/10/01メディア: 単行本(ソフトカバー) 「最近話題の RISC-V などの CPU エミュレータを作ってみたいものの、いきなり作るにはハードルが高い。何か簡単なもので素振りをして CPU の動作の仕組みをまずは知りたい」という方にはかなりオススメできる教材だ

            CPUエミュレータをRustで自作する - Don't Repeat Yourself
          • 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グランツ補助金検索システムの実装例|デジタル庁
            • 大実験!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
              • 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

                • 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の杜 🥥
                  • 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
                    • 関数型プログラミングはまずは純粋関数型言語を用いて、考え方から理解しよう

                      この記事は、関数型プログラミングはまず考え方から理解しよう の記事を純粋関数型言語Elmで書き換え、一部の文章について批判的に言及させていただいた記事になります。この記事を書こうと思ったきっかけとしては、今回参考にさせていただきた記事が過去に書かれたものにも関わらず、今に渡っても見られていそうなこと。未だにパラダイムの理解に関する誤解が多く散見されること。改めて純粋関数型言語の実用性・有用性について、見直されるべきだと思い、この記事を執筆させていただきました。 次のステップアップ記事は、[超入門] FizzBuzzで考える関数型プログラミング学習を純粋関数型言語でやる理由です。 はじめに、この記事の主張を結論としてまとめておきます。 対比すべきは、関数型プログラミングとオブジェクト指向プログラミングではなく、関数型プログラミングと手続き型プログラミングである 関数型プログラミングの考えを学

                        関数型プログラミングはまずは純粋関数型言語を用いて、考え方から理解しよう
                      • 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

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

                                    • 型安全かつシンプルな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

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

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

                                                        • Notes by djb on using Fil-C (2025)

                                                          Notes by djb on using Fil-C (2025) I'm impressed with the level of compatibility of the new memory-safe C/C++ compiler Fil-C (filcc, fil++). Many libraries and applications that I've tried work under Fil-C without changes, and the exceptions haven't been hard to get working. I've started accumulating miscellaneous notes on this page regarding usage of Fil-C. My selfish objective here is to protect

                                                          • Gamedev in Lisp. Part 1: ECS and Metalinguistic Abstraction - cl-fast-ecs by Andrew

                                                            Gamedev in Lisp. Part 1: ECS and Metalinguistic Abstraction In this series of tutorials, we will delve into creating simple 2D games in Common Lisp. The result of the first part will be a development environment setup and a basic simulation displaying a 2D scene with a large number of physical objects. It is assumed that the reader is familiar with some high-level programming language, has a gener

                                                              Gamedev in Lisp. Part 1: ECS and Metalinguistic Abstraction - cl-fast-ecs by Andrew
                                                            • Running LLaMA 7B and 13B on a 64GB M2 MacBook Pro with llama.cpp

                                                              Running LLaMA 7B and 13B on a 64GB M2 MacBook Pro with llama.cpp See also: Large language models are having their Stable Diffusion moment right now. Facebook's LLaMA is a "collection of foundation language models ranging from 7B to 65B parameters", released on February 24th 2023. It claims to be small enough to run on consumer hardware. I just ran the 7B and 13B models on my 64GB M2 MacBook Pro! I

                                                                Running LLaMA 7B and 13B on a 64GB M2 MacBook Pro with llama.cpp
                                                              • 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

                                                                  • Python is a Compiled Language

                                                                    This blog post hopes to convince you that Python is a compiled language. And by “Python”, I don’t mean alternate versions of Python like PyPy, Mypyc, Numba, Cinder, or even Python-like programming languages like Cython, Codon, Mojo1—I mean the regular Python: CPython! The Python that is probably installed on your computer right now. The Python that you got when you searched “python” on Google and

                                                                    • Why Rust strings seem hard | Brandon's Website

                                                                      Why Rust strings seem hard April 13, 2021 Lately I've been seeing lots of anecdotes from people trying to get into Rust who get really hung up on strings (&str, String, and their relationship). Beyond Rust's usual challenges around ownership, there can be an added layer of frustration because strings are so easy in the great majority of languages. You just add them together, split them, whatever!

                                                                      • Parsing SQL - Strumenta

                                                                        The code for this tutorial is on GitHub: parsing-sql SQL is a language to handle data in a relational database. If you worked with data you have probably worked with SQL. In this article we will talk about parsing SQL. It is in the same league of HTML: maybe you never learned it formally but you kind of know how to use it. That is great because if you know SQL, you know how to handle data. However

                                                                          Parsing SQL - Strumenta
                                                                        • Implementing Logic Programming

                                                                          Most of my readers are probably familiar with procedural programming, object-oriented programming (OOP), and functional programming (FP). The majority of top programming languages on all of the language popularity charts (like TIOBE) support all three to some extent. Even if a programmer avoided one or more of those three paradigms like the plague, they’re likely at least aware of them and what th

                                                                            Implementing Logic Programming
                                                                          • You Want Modules, Not Microservices

                                                                            Blog Home Archive Sections Some of my Favorites (Collections) Management Tips Speaker Tips Developer Relations Thoughts Interop Briefs Some of my Favorites (Individual posts) O/R-M is the Vietnam of Computer Science The Fallacies of Enterprise Computing SSCLI 2.0 Internals Recommended reading list Functional Java On Finding learning The Value of Failure Programming Promises; a Programmer's Hippocr

                                                                            • 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

                                                                                • The Ultimate Guide to Error Handling in Python

                                                                                  I often come across developers who know the mechanics of Python error handling well, yet when I review their code I find it to be far from good. Exceptions in Python is one of those areas that have a surface layer that most people know, and a deeper, almost secret one that a lot of developers don't even know exists. If you want to test yourself on this topic, see if you can answer the following qu

                                                                                    The Ultimate Guide to Error Handling in Python