並び順

ブックマーク数

期間指定

  • から
  • まで

1 - 36 件 / 36件

新着順 人気順

python if not equals stringの検索結果1 - 36 件 / 36件

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

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

      関数名、メソッド名、変数名でよく使う英単語のまとめ
    • 防衛省サイバーコンテスト 2025 writeup - st98 の日記帳 - コピー

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

        防衛省サイバーコンテスト 2025 writeup - st98 の日記帳 - コピー
      • ぼくのMac環境 ver.のんピ | DevelopersIO

        何年後かの自分へ こんにちは、のんピ(@non____97)です。 業務で使用する新しいMacが届きました。 新しいMacを初期セットアップするにあたって「今の設定どうだったっけ...」と調べる時間が結構かかってしまいました ということで何年後かの自分がまた新しいMacに乗り換える際に手間取らないように、設定した内容を書き記しておきます。 移行先のMacの情報は以下の通りです。M1 Max、嬉しい。 # OSのバージョンの確認 > sw_vers ProductName: macOS ProductVersion: 12.4 BuildVersion: 21F79 # カーネルのバージョン確認 > uname -r 21.5.0 # CPUのアーキテクチャの確認 > uname -m arm64 # CPUの詳細確認 > sysctl -a machdep.cpu machdep.cpu.

          ぼくのMac環境 ver.のんピ | DevelopersIO
        • GPTのEmbeddingを利用してブログの投稿に対する近いものを探し出す - きしだのHatena

          OpenAIでGPTを使ったAPIにembeddingというのがあって、これを使うと文章同士の距離がとれるので、近いエントリを取得したり文章から検索したりができるということで、試してみました。 思いのほかちゃんと動きました。おそらく、GPTで一番実用的なんじゃないでしょうか。 GPTで実際に一番出番がありそうなEmbeddingを使った、近いブログをとってきたり検索したりするやつ。 pic.twitter.com/Vzgy57a7ju— きしだൠ(K1S) (@kis) 2023年3月9日 embeddingとは なんか、文章の特徴を表す多次元のベクトルに変換してくれるらしい。 ようわからん。 OpenAIでは1500次元くらいのベクトルに変換します。 そして、このベクトルの距離が近ければ文章の内容も近いやろということで、似たエントリの抽出などができます。 しかし、テキストが要素数1500

            GPTのEmbeddingを利用してブログの投稿に対する近いものを探し出す - きしだのHatena
          • 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
            • Node.js

              Notable changes built-in .env file support Starting from Node.js v20.6.0, Node.js supports .env files for configuring environment variables. Your configuration file should follow the INI file format, with each line containing a key-value pair for an environment variable. To initialize your Node.js application with predefined configurations, use the following CLI command: node --env-file=config.env

                Node.js
              • 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

                • [電話無人対応] Amazon Connectで通話中に発話した内容を、Amazon Transcribeで文字起こしし復唱してみた | DevelopersIO

                  はじめに Amazon Connectでの発話内容をAmazon Transcribeで文字起こしし、音声出力するフローを構築しましたので、手順をまとめました。コンタクトセンターの無人対応を想定しています。 文字起こし内容を音声出力するまでの流れは次の通りです。 コンタクトフロー内で「メディアストリーミングの開始」ブロックを使って、Amazon Kinesis Video Streams(以降、KVS)への音声のストリーミングを開始します。 発話します。 発話後、「顧客の入力を保存する」ブロックで、顧客が特定の番号を押すと、ストリーミングが終了します。 「AWS Lambda関数を呼び出す」ブロックを使い、以下の処理を行います。 LambdaでKVSからメディアデータを取得します。 メディアデータから音声データを抽出し、WAV形式に変換し、S3バケットに音声ファイルを保存します。 Amaz

                    [電話無人対応] Amazon Connectで通話中に発話した内容を、Amazon Transcribeで文字起こしし復唱してみた | DevelopersIO
                  • Agentic GraphRAG for Commercial Contracts | Towards Data Science

                    In every business, legal contracts are foundational documents that define the relationships, obligations, and responsibilities between parties. Whether it’s a partnership agreement, an NDA, or a supplier contract, these documents often contain critical information that drives decision-making, risk management, and compliance. However, navigating and extracting insights from these contracts can be a

                      Agentic GraphRAG for Commercial Contracts | Towards Data Science
                    • Lies we tell ourselves to keep using Golang

                      👋 This page was last updated ~3 years ago. Just so you know. In the two years since I’ve posted I want off Mr Golang’s Wild Ride, it’s made the rounds time and time again, on Reddit, on Lobste.rs, on HackerNews, and elsewhere. And every time, it elicits the same responses: You talk about Windows: that’s not what Go is good at! (Also, who cares?) This is very one-sided: you’re not talking about th

                        Lies we tell ourselves to keep using Golang
                      • LangGraph for complex workflows — surma.dev

                        Toggle dark mode I may be late to the party, but LangGraph lets you build complex workflow architectures and codify them as powerful automations. Also LLMs, if you want. But you don’t have to! LLM Architecture I always liked the idea of “flow-based” programming. PureData, DaVinci Resolve, Node Red... they all appeal to me. I also always liked the idea of running LLMs locally, rather than spending

                          LangGraph for complex workflows — surma.dev
                        • The Absolute Minimum Every Software Developer Must Know About Unicode in 2023 (Still No Excuses!) @ tonsky.me

                          If you combine this with the Unicode table, you’ll see that English is encoded with 1 byte, Cyrillic, Latin European languages, Hebrew and Arabic need 2, and Chinese, Japanese, Korean, other Asian languages, and Emoji need 3 or 4. A few important points here: First, UTF-8 is byte-compatible with ASCII. The code points 0..127, the former ASCII, are encoded with one byte, and it’s the same exact byt

                            The Absolute Minimum Every Software Developer Must Know About Unicode in 2023 (Still No Excuses!) @ tonsky.me
                          • CloudFormation一撃で作るAWS料金通知ツール(Email/Slack/LINE対応) | DevelopersIO

                            以前本記事で使用していたLINE Notifyが2025/3/31にサービス終了します。 代わりにLINE Messaging APIへ通知するよう構築手順及びCloudFormationテンプレートを更新したので、今後はこちらをご利用ください。 https://developers.line.biz/ja/news/2024/10/07/line-notify-will-be-discontinued/ こんにちは、つくぼし(tsukuboshi0755)です! 以前以下のブログで、利用しているAWS料金を毎日LINEに通知するツールを構築しました。 上記ブログは様々な方々から大きな反響を頂いた一方で、以下のような課題もありました。 AWS SAMの利用を前提とするため、ローカル開発環境の構築が別途必要 通知間隔として毎日しか指定できない 通知先としてLINEしか指定できない LINE

                              CloudFormation一撃で作るAWS料金通知ツール(Email/Slack/LINE対応) | DevelopersIO
                            • MySQL 8.0のCharset utf8mb4での日本語環境で使うCollationで文字比較をしてみる - CLOVER🍀

                              これは、なにをしたくて書いたもの? MySQL 8.0のCharset utf8mb4で使えるCollationについて、ちょっと見ておこうかなと思いまして。 具体的には、「MySQL徹底入門 第4版」の「11.2 Collation」に書かれている文字比較およびソートについて自分で 確認してみたいと思います。 MySQL徹底入門 第4版 MySQL 8.0対応 作者:yoku0825,坂井 恵,鶴長 鎮一,とみたまさひろ,深町 日出海,福山 裕大,班石 悦夫,山﨑 由章翔泳社Amazon utf8mb4でのCharsetとCollation MySQLのCharsetとCollationに関するドキュメントは、こちらです。 MySQL :: MySQL 8.0 リファレンスマニュアル :: 10 文字セット、照合順序、Unicode MySQLでは複数のCharset(文字セット)を使う

                                MySQL 8.0のCharset utf8mb4での日本語環境で使うCollationで文字比較をしてみる - CLOVER🍀
                              • Graceful shutdowns with ECS | Amazon Web Services

                                Containers Graceful shutdowns with ECS February 2023: Parts of this blog are no longer accurate. Following enhancements to the ELB integration for ECS services, tasks running on Fargate Spot will be deregistered from a target group if it receives a spot termination notice before a SIGTERM is issued to the Task. Introduction Amazon Elastic Container Service (Amazon ECS) gives customers the flexibil

                                  Graceful shutdowns with ECS | Amazon Web Services
                                • AWS Amplify Hosting(AWS Amplify Console)にAmazon CloudFrontとAWS WAFを追加してIP制限を設定してみた - カスタムオリジンにIP制限、基本認証、SSL/TLS証明書を追加するAWS CloudFormationテンプレート - NRIネットコムBlog

                                  小西秀和です。 以前、次の記事でAWS Amplify Hosting(AWS Amplify Console)の構築方法について紹介しました。 AWSの静的ウェブサイトホスティングで入門するAWS Amplify(Console、CLI) - 構築編(Amplify Console) しかし、AWS Amplify Hosting(AWS Amplify Console)では基本認証や証明書追加の機能はありますが、IP制限の機能がサポートされていません。 そのため、今回は内部がAmazon S3とAmazon CloudFrontで構成されていると推測されるAWS Amplify Hostingをカスタムオリジンと見なし、Amazon CloudFront、AWS WAF、Lambda@Edgeを使用してIP制限機能の追加と基本認証機能のオーバーライドを試してみたいと思います。 補足です

                                    AWS Amplify Hosting(AWS Amplify Console)にAmazon CloudFrontとAWS WAFを追加してIP制限を設定してみた - カスタムオリジンにIP制限、基本認証、SSL/TLS証明書を追加するAWS CloudFormationテンプレート - NRIネットコムBlog
                                  • PySkyWiFi: completely free, unbelievably stupid wi-fi on long-haul flights | Robert Heaton

                                    The plane reached 10,000ft. I took out my laptop, planning to peruse the internet and maybe do a little work if I got really desperate. I connected to the in-flight wi-fi and opened my browser. The network login page demanded credit card details. I fumbled for my card, which I eventually discovered had hidden itself inside my passport. As I searched I noticed that the login page was encouraging me

                                      PySkyWiFi: completely free, unbelievably stupid wi-fi on long-haul flights | Robert Heaton
                                    • 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
                                      • Instance Schedulerを使ってEC2の稼働時間を管理してみた

                                        概要 会社で使っているEC2はSavings Plansを採用していてオンデマンドで使うよりも安い料金でEC2を利用しています。 ただそれでもEC2の数が段々と増えていて、当初の予想よりもコンピューティングリソースの消費が大きくなりEC2の利用料が大きくなってきました。 そこで検証環境のEC2の稼働時間を減らし、コンピューティングリソースの消費を抑えることでEC2の利用料を節約しようと思いました。 前職では先輩が作成したLambdaで21:00~翌9:00の時間帯は自動でシャットダウンする仕組みができており、当初はそれを真似しようと思いましたがInstance Schedulerなるものを今の会社のリーダーから教わりました。 今回はInstance Schedulerを実際に使ってみてどういったものなのか試してみました。 Instance Schedulerについて 先にお話しするとIns

                                          Instance Schedulerを使ってEC2の稼働時間を管理してみた
                                        • 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

                                          • XOR

                                            The truth table of XOR, shown in two different ways But just saying what it is doesn’t give a good intuition for what things it’s useful for, or when to use it. So in the next few sections I’ll present a few different ways of thinking about what XOR does. For such a simple operation, it’s possible to describe what it does in a lot of quite different-looking ways. But all of them are true at once!

                                            • Scaling DynamoDB: How partitions, hot keys, and split for heat impact performance (Part 1: Loading) | Amazon Web Services

                                              AWS Database Blog Scaling DynamoDB: How partitions, hot keys, and split for heat impact performance (Part 1: Loading) The general rule with Amazon DynamoDB is to choose a high cardinality partition key. But why; and what happens if you don’t? Inspired by a customer use case, we dive deep into this question and explore the performance of loading and querying DynamoDB using different partition key d

                                                Scaling DynamoDB: How partitions, hot keys, and split for heat impact performance (Part 1: Loading) | Amazon Web Services
                                              • The simplicity of Prolog

                                                Back to homepage Nowadays the most popular programming languages are Python, Javascript, Java, C++, C#, Kotlin and Ruby, and the average programmer is probably familiar with one or more of these languages. It's relatively easy to switch from one to another (barring any framework specific knowledge that may be needed), since they are all imperative (and for the most part object-oriented) languages,

                                                • Large Text Compression Benchmark

                                                   Large Text Compression Benchmark Matt Mahoney Last update: July 3, 2025. history This competition ranks lossless data compression programs by the compressed size (including the size of the decompression program) of the first 109 bytes of the XML text dump of the English version of Wikipedia on Mar. 3, 2006. About the test data. The goal of this benchmark is not to find the best overall compressi

                                                  • Amazon S3とAmazon CloudFrontによる静的ウェブサイトにSSL/TLS証明書(AWS Certificate Manager)・基本認証(Lambda@Edge)・IP制限(AWS WAF)をクロスリージョンで追加するAWS CloudFormationテンプレートとAWS Lambdaカスタムリソース - NRIネットコムBlog

                                                    小西秀和です。 この記事は過去に投稿した次の記事の続編で、SSL/TLS証明書(AWS Certificate Manager)、基本認証(Lambda@Edge)に加えてIP制限(AWS WAF)を追加したパターンでAmazon S3とAmazon CloudFrontによる静的ウェブサイトホスティングをAWS CloudFormationテンプレートとAWS Lambdaカスタムリソースを使用して構成するものです。 AWS LambdaカスタムリソースでSSL証明書・基本認証・CloudFrontオリジンフェイルオーバーを作成するAWS CloudFormationスタックを別リージョンにデプロイする 今回は更にOrigin Access Identity(OAI)をOrigin Access Control (OAC)に変更し、キャッシュポリシー(CachePolicy)、オリジンリ

                                                      Amazon S3とAmazon CloudFrontによる静的ウェブサイトにSSL/TLS証明書(AWS Certificate Manager)・基本認証(Lambda@Edge)・IP制限(AWS WAF)をクロスリージョンで追加するAWS CloudFormationテンプレートとAWS Lambdaカスタムリソース - NRIネットコムBlog
                                                    • 17 types of similarity and dissimilarity measures used in data science. | Towards Data Science

                                                      The following article explains various methods for computing distances and showing their instances in our daily lives. Additionally, it… Various ML metrics. Inspired by Maarten Grootendorst. "There is no Royal Road to Geometry." – Euclid Quick note: Everything written and visualized has been created by the author unless it was specified. Illustrations and equations were generated using tools like

                                                        17 types of similarity and dissimilarity measures used in data science. | Towards Data Science
                                                      • JSON is not JSON Across Languages | Dochia CLI Blog

                                                        Introduction: These Aren’t the JSONs You’re Looking For JSON (JavaScript Object Notation) was designed as a simple, lightweight, and human-readable data interchange format, often positioned as a more accessible alternative to XML. It has become the de facto standard for web APIs and system integration. However, while the specification itself is straightforward, different programming languages and

                                                          JSON is not JSON Across Languages | Dochia CLI Blog
                                                        • SAM Pipelineで作成されるリソースを眺めてみる | DevelopersIO

                                                          「実際に手を動かす前に、SAM Pipelineの雰囲気をなんとなく掴みたい。。」 SAM Pipelineは対話形式で必要な情報を渡すと、サーバレスアプリケーションのデプロイパイプライン用のCloudFormation Templateを自動生成してくれます。 パイプライン作成をよしなにやってくれる機能ではありますが、中身もある程度知っておきたいものです。 勉強がてら作成してくれるリソースを眺めてみます。 準備: SAM Pipelineの作成 CodeCommitをソースにして、PipelineはCodePipelineを使用したものを作成します。 コマンドを実行して、CloudFormation Template等必要なファイルを用意します。 SAM Pipelineの使い方やデプロイの流れは以下の記事がわかりやすかったです。 % sam pipeline bootstrap # 省

                                                            SAM Pipelineで作成されるリソースを眺めてみる | DevelopersIO
                                                          • Amazon Inspectorの検出結果をリソース単位でまとめてメール通知する方法 | DevelopersIO

                                                            はじめに 以前、Amazon Inspectorの検出結果をAWS Security Hubを経由してメール通知する方法をご紹介しました。 Inspectorは脆弱性を検出するたびに結果を作成するため、1つのリソースに対して複数の脆弱性が見つかった場合、その数だけメール通知が発生してしまいます。例えば、100個の脆弱性が検出されると、100通のメールが送信される状況でした。 本記事では、脆弱性ごとの通知ではなく、1リソースごとに検出結果をまとめて1回の通知で済ませる方法をご紹介します。 構成は以下のとおりです。 本実装は、以下の流れで処理を行います。 Inspectorで検出結果が作成され、Security Hub経由でEventBridgeが起動します。 Firehose ストリームに検出結果が一時保存されます。 Firehose ストリームは、指定したバッファ期間内に受信したイベントを

                                                              Amazon Inspectorの検出結果をリソース単位でまとめてメール通知する方法 | DevelopersIO
                                                            • A History of Clojure

                                                              71 A History of Clojure RICH HICKEY, Cognitect, Inc., USA Shepherd: Mira Mezini, Technische Universität Darmstadt, Germany Clojure was designed to be a general-purpose, practical functional language, suitable for use by professionals wherever its host language, e.g., Java, would be. Initially designed in 2005 and released in 2007, Clojure is a dialect of Lisp, but is not a direct descendant of any

                                                              • January 2022 (version 1.64)

                                                                Join a VS Code Dev Days event near you to learn about AI-assisted development in VS Code. Update 1.64.1: The update addresses these security issues. Update 1.64.2: The update addresses these issues. Downloads: Windows: x64 Arm64 | Mac: Universal Intel silicon | Linux: deb rpm tarball Arm snap Welcome to the January 2022 release of Visual Studio Code. There are many updates in this version that we

                                                                  January 2022 (version 1.64)
                                                                • Webアプリケーションを自動で操作してみよう | へっぽこ実験ブログ

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

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

                                                                    Hacker. Emacs fanatic. Lover of parentheses. Firebrand. Just another programmer with too many opinions. I’m not the best, but I’m pretty good. If someone had told me a few months ago I’d be playing with .NET again after a 15+ years hiatus I probably would have laughed at this.1 Early on in my career I played with .NET and Java, and even though .NET had done some things better than Java (as it had

                                                                      Why F#?
                                                                    • GitHub - ab25cq/comelang: comelang is C + GC compiler. It has reffrence count GC with memory leak detector. self-hosted with zero memory leaks. It depends on standard C lib only and outputs the code depends standard C libraries

                                                                      100.0.0 Remove Exception. Buggy function may be few. Complete. 70.0.0 Fixed bug, and some function has been removed. 60.0.0 More compatiblity for C language. 50.1.0 user finalize and user clone removed. It makes bugs. 50.0.0 This project may be complete. 40.0.0 Refactoring this project may be complete. 38.0.0 Refactoring 37.0.0 type infference come again. 36.0.0 template remove type infference, li

                                                                        GitHub - ab25cq/comelang: comelang is C + GC compiler. It has reffrence count GC with memory leak detector. self-hosted with zero memory leaks. It depends on standard C lib only and outputs the code depends standard C libraries
                                                                      • Java Interview Questions

                                                                        Java remains one of the most common and popular programming languages in the world because of its strong features. Therefore, it’s no surprise that good Java programmers are very much sought after by almost all organizations across the world – be it startups or large multinational corporations. Considering the above, we created a list of common job interview questions about Java programming with d

                                                                          Java Interview Questions
                                                                        • Hay - Custom Languages for Unix Systems

                                                                          Example Hay could be used to configure a hypothetical Linux package manager: # cpython.hay -- A package definition hay define Package/TASK # define a tree of Hay node types Package cpython { # a node with attributes, and children version = '3.9' url = 'https://python.org' TASK build { # a child node, with Oil code ./configure make } } This program evaluates to a JSON tree, which you can consume fr

                                                                          1