並び順

ブックマーク数

期間指定

  • から
  • まで

1 - 40 件 / 64件

新着順 人気順

python check if string is valid intの検索結果1 - 40 件 / 64件

  • 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
    • 関数名、メソッド名、変数名でよく使う英単語のまとめ

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

        関数名、メソッド名、変数名でよく使う英単語のまとめ
      • 大実験!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
        • 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
          • 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

            • データ検証ライブラリPydanticの紹介 | gihyo.jp

              寺田 学(@terapyon)です。2025年10月の「Python Monthly Topics」は、データ検証ライブラリのPydanticを紹介します。 型安全とデータ構造 主題のPydanticの説明に入る前に、Pythonにおける型安全の考え方とデータ構造についておさらいしておきます。 型安全のための型ヒント Pythonは動的型付け言語です。型を宣言せずにコーディングすることができますが、型ヒントを書くことで型安全にコーディングできます。最近のPythonコードには型ヒントが書かれていることが多くなっているかと思います。 本連載(Python Monthly Topics)でも過去に型ヒント関係のトピックを扱っていますので、参照してください。 2022年9月:Python最新バージョン対応!より良い型ヒントの書き方 2024年11月:Python型ヒントの動向と新しい機能の紹介

                データ検証ライブラリPydanticの紹介 | gihyo.jp
              • RubyのGVLを消し去りたいあなたへ(翻訳)|TechRacho by BPS株式会社

                概要 原著者の許諾を得て翻訳・公開いたします。 英語記事: So You Want To Remove The GVL? | byroot’s blog 原文公開日: 2025/01/29 原著者: byroot -- Railsコアコミッター、Rubyコミッターであり、ShopifyのRuby/Railsインフラチームのシニアスタッフエンジニアです 日本語タイトルは内容に即したものにしました。 GVLは「グローバルVMロック」の略ですが、「ジャイアントVMロック」とされることもあります。 参考: Rubyの(グローバル)VMロックをトレースする(翻訳) 参考: スレッド (Ruby 3.4 リファレンスマニュアル) 私がやりたいのは、Pitchforkに関する記事を書いて、これがどんな理由でできたのか、なぜ現在のような形になったのか、そして今後どうなるのかについて説明することです。しかし

                  RubyのGVLを消し去りたいあなたへ(翻訳)|TechRacho by BPS株式会社
                • 缶つぶし機とソフトウェア移行技術 - Refactoring to Rust の読書感想文 - じゃあ、おうちで学べる

                  はじめに ——あるいは、「知っている」と「理解している」の間 Rustのことは、知っていた。学習もしていた。実務でも使っていた。 でも、それは知っているつもりだった。 知ってるつもり 無知の科学 (ハヤカワ文庫NF) 作者:スティーブン スローマン,フィリップ ファーンバック早川書房Amazon 日々Rustで開発し、BoxとRcとArcを使い分け、tokio::spawnでタスクを生成し、?演算子を当たり前のように書いている。FFI?PyO3使えばいいでしょ。WebAssembly?wasm-bindgenがあるじゃない。技術的には、確かに「使える」レベルにはあった。 でも、心のどこかで感じていた違和感があった。 オートバイのエンジンを分解できる人と、エンジンが動く原理を理解している人は違う。コードが動くことと、なぜそう書くべきかを理解することも違う。私は前者だった。メカニックではあった

                    缶つぶし機とソフトウェア移行技術 - Refactoring to Rust の読書感想文 - じゃあ、おうちで学べる
                  • Onyx, a new programming language powered by WebAssembly · Blog · Wasmer

                    Onyx, a new programming language powered by WebAssemblyLearn about Onyx, a new imperative programming language that leverages WebAssembly and Wasmer for seamless cross-platform support What is Onyx? Onyx is a new programming language featuring a modern, expressive syntax, strict type safety, blazingly-fast build times, and out-of-the-box cross platform support thanks to WebAssembly. Over the past

                      Onyx, a new programming language powered by WebAssembly · Blog · Wasmer
                    • What a good debugger can do 🔮

                      When people say “debuggers are useless and using logging and unit-tests is much better,” I suspect many of them think that debuggers can only put breakpoints on certain lines, step-step-step through the code, and check variable values. While any reasonable debugger can indeed do all of that, it’s only the tip of the iceberg. Think about it; we could already step through the code 40 years ago, sure

                        What a good debugger can do 🔮
                      • How terminal works. Part 1: Xterm, user input

                        Motivation Introduction User input strace Printing non-printable stty raw -echo -isig UTF-8 Conclusion Motivation This blog series explains how modern terminals and command-line tools work. The primary goal here is to learn by experimenting. I’ll provide Linux tools to debug every component mentioned in the discussion. Our focus is to discover how things work. For the explanation of why things wor

                        • 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
                          • Python's "Type Hints" are a bit of a disappointment to me

                            blog - git - desktop - images - contact Python's "Type Hints" are a bit of a disappointment to me 2022-04-21 Preface You are reading version 2.0 of this blog post. I've incorporated some feedback I got into this revised version. Introduction Over the course of several Python 3.x versions, "type hints" were introduced. You can now annotate functions: def greeting(name: str) -> str: return 'Hello '

                            • Kalyn: a self-hosting compiler for x86-64

                              Over the course of my Spring 2020 semester at Harvey Mudd College, I developed a self-hosting compiler entirely from scratch. This article walks through many interesting parts of the project. It’s laid out so you can just read from beginning to end, but if you’re more interested in a particular topic, feel free to jump there. Or, take a look at the project on GitHub. Table of contents What the pro

                              • Why I use attrs instead of pydantic

                                This post is an account of why I prefer using the attrs library over Pydantic. I'm writing it since I am often asked this question and I want to have something concrete to link to. This is not meant to be an objective comparison of attrs and Pydantic; I'm not interested in comparing bullet points of features, nor can I be unbiased since I'm a major contributor to attrs (at time of writing, second

                                • 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

                                  • Zig in 30 minutes

                                    test.md A half-hour to learn Zig This is inspired by https://fasterthanli.me/blog/2020/a-half-hour-to-learn-rust/ Basics the command zig run my_code.zig will compile and immediately run your Zig program. Each of these cells contains a zig program that you can try to run (some of them contain compile-time errors that you can comment out to play with) You'll want to declare a main() function to get

                                      Zig in 30 minutes
                                    • Lean for JavaScript Developers — overreacted

                                      Lean for JavaScript DevelopersSeptember 2, 2025 This is my opinionated syntax primer for the Lean programming language. It is far from complete and may contain inaccuracies (I’m still learning Lean myself) but this is how I wish I was introduced to it, and what I wish was clarified. Why Lean? This post assumes you’re already eager to learn a bit of Lean. For motivation, I humbly submit to you two

                                        Lean for JavaScript Developers — overreacted
                                      • So You Want To Remove The GVL?

                                        I want to write a post about Pitchfork, explaining where it comes from, why it is like it is, and how I see its future. But before I can get to that, I think I need to share my mental model on a few things, in this case, Ruby’s GVL. For quite a long time, it has been said that Rails applications are mostly IO-bound, hence Ruby’s GVL isn’t that big of a deal and that has influenced the design of so

                                        • ​Getting Started with Python

                                          Python is a powerful programming language that provides many packages that we can use. Using the versatile Python programming language, we can develop the following: AutomationDesktop applicationAndroidWebIoT home automationData Science and the list goes on.In this article, our primary focus will be knowing how to start learning Python and the essentials required to be a data scientist. Below is t

                                            ​Getting Started with Python
                                          • Pydanticで始めるイミュータブルクラス駆動開発 - NFLabs. エンジニアブログ

                                            はじめに こんにちは!NFLabs. 研究開発部の林です。普段はセキュリティ教育プラットフォームの開発をしています。 今回はセキュアコーディングの重要な要素である「バリデーション(入力検証)」に関連して、PythonのPydanticライブラリにフォーカスしてお話します。 Python界隈では、昨今、型ヒントやFastAPIの普及に伴い、型の重要性や有用性が徐々に認識されつつあるかと思います。 それに伴い、バリデーションライブラリのデファクトスタンダードの一つであるPydanticの注目度も上がってきたと感じています。 Pydanticは実行速度の速さを特長として挙げていますが、Pydanticがもたらす安全性・Immutable(不変)性は、開発速度向上にも一役買っています。 本稿ではPydanticがいかに開発速度・開発体験に寄与するか考察します。 ちなみに、タイトルの「イミュータブル

                                              Pydanticで始めるイミュータブルクラス駆動開発 - NFLabs. エンジニアブログ
                                            • Dynamic Programming is not Black Magic - Quentin Santos

                                              This year’s Advent of Code has been brutal (compare the stats of 2023 with that of 2022, especially day 1 part 1 vs. day 1 part 2). It included a problem to solve with dynamic programming as soon as day 12, which discouraged some people I know. This specific problem was particularly gnarly for Advent of Code, with multiple special cases to take into account, making it basically intractable if you

                                                Dynamic Programming is not Black Magic - Quentin Santos
                                              • Lesser Known PostgreSQL Features

                                                In 2006 Microsoft conducted a customer survey to find what new features users want in new versions of Microsoft Office. To their surprise, more than 90% of what users asked for already existed, they just didn't know about it. To address the "discoverability" issue, they came up with the "Ribbon UI" that we know from Microsoft Office products today. Office is not unique in this sense. Most of us ar

                                                  Lesser Known PostgreSQL Features
                                                • NumPy 2.0.0 Release Notes — NumPy v2.4.dev0 Manual

                                                  Getting started What is NumPy? Installation NumPy quickstart NumPy: the absolute basics for beginners Fundamentals and usage NumPy fundamentals NumPy for MATLAB users NumPy tutorials NumPy how-tos Advanced usage and interoperability Using NumPy C-API F2PY user guide and reference manual Under-the-hood documentation for developers Interoperability with NumPy Extras Glossary Release notes 2.4.0 2.3.

                                                  • TIL: eBPF is awesome

                                                    A blog about programming, technology and open-source stuff. I was doing some research at work for tracing and observability for microservices, when I came across Pixielabs. This tool advertises that you can instantly troubleshoot applications without any instrumentation or special code inside the apps, which sounded ✨magical✨ to me. So naturally I wanted to know a little more about what enables th

                                                    • AWS公式のECSハンズオンがとても良かった!! - Qiita

                                                      はじめに お疲れ様です。矢儀 @yuki_ink です。 こちらのAWS公式ハンズオンをやってみました。 ECSとFargate/EC2を利用した環境構築から、CI/CDパイプラインを利用したデプロイまで、一通り体験できる素晴らしいハンズオンでした。 次のようなみなさんにおすすめです。 ECSを知識として知ってはいるが、実際に触ったことがない コンテナの何が優れているのか、実感を持っては理解できない CI/CDパイプラインでコンテナをデプロイしてみたい ハンズオンで構築する環境の構成イメージはこちら。 1. VS Code Serverの構築 このハンズオンでは、開発環境として Visual Studio Code Server (VS Code Server) を利用するとのことで、まず、CloudFormationでVS Code Serverを構築していきます。 ハンズオンページの

                                                        AWS公式のECSハンズオンがとても良かった!! - Qiita
                                                      • [Ansible] そのtag設定、想定通りに動いてますか? (継承機能とその実装を確認する) - zaki work log

                                                        playbook内のtask定義にtagを設定しておくことで、指定tagのtaskのみ実行したり、逆に指定tagのtaskを除外してansible-playbookを実行することができます。 開発中のtaskのみピンポイントで実行したい場合や、逆に、共有のDBのデータを更新したりするtaskはほかのユーザーやチームと調整してからでないと実行が難しかったり、Blue-Greenデプロイメントの実装で環境Aの機能をオフにしてもう片方の環境Bをオンにするような処理だけど開発中は環境Bだけ確認したかったり、大量データのダウンロードや冪等の確認を伴い処理に時間がかかるため開発中は実行したくないなど特定のtaskは実行したくない場合に利用できます。 また、特殊tagとして、常に実行するalwaysと実行しないneverというtagが予約語として用意されています。 neverは特に「通常は実行したくない

                                                          [Ansible] そのtag設定、想定通りに動いてますか? (継承機能とその実装を確認する) - zaki work log
                                                        • Unicode is harder than you think · mcilloni's blog

                                                          Reading the excellent article by JeanHeyd Meneide on how broken string encoding in C/C++ is made me realise that Unicode is a topic that is often overlooked by a large number of developers. In my experience, there’s a lot of confusion and wrong expectations on what Unicode is, and what best practices to follow when dealing with strings that may contain characters outside of the ASCII range. This a

                                                          • February 2024 (version 1.87)

                                                            Update 1.87.1: The update addresses these issues. Update 1.87.2: The update addresses this security issue. Downloads: Windows: x64 Arm64 | Mac: Universal Intel silicon | Linux: deb rpm tarball Arm snap Welcome to the February 2024 release of Visual Studio Code. There are many updates in this version that we hope you'll like, some of the key highlights include: Voice dictation in editor - Use your

                                                              February 2024 (version 1.87)
                                                            • A 2025 Survey of Rust GUI Libraries

                                                              I did this in 2020 and then again in 2021, but I’m in the mood to look around again. Let’s look through Are We GUI Yet? and see what’s up these days. The task today is to have a text label and an input field that can change the text in the label. In React, for example, this is basically free: const Demo = () => { let [state, setState] = useState("Hello, world!"); return ( <div> <p>{state}</p> <inp

                                                              • Type Parameters Proposal

                                                                Ian Lance Taylor Robert Griesemer August 20, 2021 StatusThis is the design for adding generic programming using type parameters to the Go language. This design has been proposed and accepted as a future language change. We currently expect that this change will be available in the Go 1.18 release in early 2022. AbstractWe suggest extending the Go language to add optional type parameters to type an

                                                                • Leaving Haskell behind

                                                                  For almost a complete decade—starting with discovering Haskell in about 2009 and right up until switching to a job where I used primarily Ruby and C++ in about 2019—I would have called myself first and foremost a Haskell programmer. Not necessarily a dogmatic Haskeller! I was—and still am—proudly a polyglot who bounces between languages depending on the needs of the project. However, Haskell was m

                                                                    Leaving Haskell behind
                                                                  • Node.js — Node.js v22.10.0 (Current)

                                                                    Or if the package is only meant to be run on Node.js and wants to fallback to CJS on older versions that don't have require(esm): { "type": "module", "exports": { // On new version of Node.js, both require() and import get the ESM version "module-sync": "./index.js", // On older version of Node.js, where "module-sync" and require(esm) are // not supported, use the CJS version to avoid dual-package

                                                                      Node.js — Node.js v22.10.0 (Current)
                                                                    • ACTINIUM targets Ukrainian organizations | Microsoft Security Blog

                                                                      April 2023 update – Microsoft Threat Intelligence has shifted to a new threat actor naming taxonomy aligned around the theme of weather. ACTINIUM is now tracked as Aqua Blizzard and DEV-0586 is now tracked as Cadet Blizzard. To learn about how the new taxonomy represents the origin, unique traits, and impact of threat actors, and to get a complete mapping of threat actor names, read this blog: Mic

                                                                        ACTINIUM targets Ukrainian organizations | Microsoft Security Blog
                                                                      • Python behind the scenes #11: how the Python import system works

                                                                        If you ask me to name the most misunderstood aspect of Python, I will answer without a second thought: the Python import system. Just remember how many times you used relative imports and got something like ImportError: attempted relative import with no known parent package; or tried to figure out how to structure a project so that all the imports work correctly; or hacked sys.path when you couldn

                                                                        • Making a micro Linux distro

                                                                          Follow @popovicu94 In this article, we’ll talk about building up a tiny (micro) Linux “distribution” from scratch. This distribution really won’t do much, but it will be built from scratch. We will build the Linux kernel on our own, and write some software to package our micro-distro. Lastly, we are doing this example on the RISC-V architecture, specifically QEMU’s riscv64 virt machine. There’s ve

                                                                            Making a micro Linux distro
                                                                          • [Rust] AyaでeBPFプログラムをつくってみる | DevelopersIO

                                                                            Introduction eBPFは、Linuxカーネル対して動的に機能を拡張する技術で、 カーネルで独自のプログラムを安全に実行することができます。 これらのプログラムは任意のポイントに設定可能で、さまざまなタイミングで 実行できます。 eBPFは、カーネル再構築なしでカーネルの動作をカスタマイズすることができるため、 近年いろいろな用途に使われています。 今回はBCC/bpftoolで少しeBPFを使ってみた後、 Aya(eBPF用Rustフレームワーク)を使ってXDPのサンプルをつくってみます。 eBPF? eBPFはExtended Berkeley Packet Filterの略で、 もともとはLinuxでデータパケットを効率的にフィルタリングするために 開発された技術ですが、現在はその機能が拡張されて、 カーネルのコード変更やモジュール追加なしで 独自のプログラムをカーネルで実

                                                                              [Rust] AyaでeBPFプログラムをつくってみる | DevelopersIO
                                                                            • 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

                                                                              • OpenAssistant/oasst1 · Datasets at Hugging Face

                                                                                'Jew' or 'rabbi'"},"role":{"kind":"string","value":"assistant"},"lang":{"kind":"string","value":"en"},"review_count":{"kind":"number","value":3,"string":"3"},"review_result":{"kind":"bool","value":true,"string":"true"},"deleted":{"kind":"bool","value":false,"string":"false"},"rank":{"kind":"number","value":1,"string":"1"},"synthetic":{"kind":"bool","value":false,"string":"false"},"model_name":{"ki

                                                                                  OpenAssistant/oasst1 · Datasets at Hugging Face
                                                                                • Node.js — Node.js v23.0.0 (Current)

                                                                                  2024-10-16, Version 23.0.0 (Current), @RafaelGSS We’re excited to announce the release of Node.js 23! Key highlights include: Enabling require(esm) by default for Node.js applications Removing support for Windows 32-bit systems Stabilizing the node --run command Enhancements to the test runner, including glob pattern support for coverage files Node.js 23 will replace Node.js 22 as the ‘Current’ re

                                                                                    Node.js — Node.js v23.0.0 (Current)