並び順

ブックマーク数

期間指定

  • から
  • まで

1 - 40 件 / 126件

新着順 人気順

input and if statement pythonの検索結果1 - 40 件 / 126件

  • 本番環境で採用すべき26のAWSセキュリティベストプラクティス

    本文の内容は、2024年11月25日に Alejandro Villanueva が投稿したブログ(https://sysdig.com/blog/26-aws-security-best-practices/)を元に日本語に翻訳・再構成した内容となっております。 セキュリティは、 AWS Foundational セキュリティベストプラクティスの基本的な柱です。セキュリティリスクを最小限に抑え、環境を保護するには、サービス別にまとめられた AWS セキュリティベストプラクティスに従うことが不可欠です。この構造化されたアプローチは、潜在的な脆弱性に積極的に対処し、堅牢で安全なクラウドアーキテクチャーを維持するのに役立ちます。 AWS IAM(1) IAMポリシーでは、フルの ” * ” 管理者権限を許可すべきではない (2) IAMユーザーにはIAMポリシーを添付してはならない (3) I

      本番環境で採用すべき26のAWSセキュリティベストプラクティス
    • 法律のデータ構造と検索

      デジタル庁は、法令標準 XML スキーマに準拠した、現行の法令データをe-Gov法令検索というサイト上で公開しています[1]。今回、この法令XMLをパースするPythonライブラリ ja-law-parser をつくり、法令データの全文検索をしてみました。 この記事では、日本の法令とそのデータ構造、法令XMLパーサについて解説し、最後に、それらを使った法令データの全文検索システムを実装する方法をご紹介します。法令検索の実装についても、GitHubリポジトリで公開しています。 この記事は、情報検索・検索技術 Advent Calendar 2023の16日目の記事です。 法律と法令 法律とは 法律の制定と公布 法律と法令の違い 法律の改正 法令のデータ構造 e-Govの法令データ 法令標準XMLスキーマ 法令番号と法令ID 題名 本則と附則 条・項・号 編・章・節・款・目 法令XMLパーサ:

        法律のデータ構造と検索
      • 関数名、メソッド名、変数名でよく使う英単語のまとめ

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

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

          Going through the files inside a tab's folder. For example, the url.txt, text.txt, and title.txt files tell me those live properties of this tab (Read more up-to-date documentation for all of TabFS's files here.) This gives you a ton of power, because now you can apply all the existing tools on your computer that already know how to deal with files -- terminal commands, scripting languages, point-

            TabFS
          • 大実験!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
            • 【Amazon Bedrock】AWSサービスのみを使ったシンプル構成のRAGアプリを作ってみた - NRIネットコムBlog

              はじめに RAGとは 構成図 作成リソース Lambda 1. PDFから文書抽出&Embedding取得Lambda 2. 回答作成用Lambda AWS SAM テンプレート Streamlit 動作確認 まとめ はじめに こんにちは堤です。 Amazon BedrockがGAとなり、AWS内で完結してLLMアプリケーションを構築できるようになりました。 試しにRAGアプリケーションを作成してみようと思いましたが、現状AWSでRetrievalするデータソースを作成しようとすると、Amazon OpenSearch Serverless やAmazon Kendraを使用するしかありません。これらのサービスを使うのはコストもそれなりにかかり少しハードルが高いなーと思っていたら以下のブログを見つけました。 aws.amazon.com 構成図を見ると分かるように、S3にembedding

                【Amazon Bedrock】AWSサービスのみを使ったシンプル構成のRAGアプリを作ってみた - NRIネットコムBlog
              • 【動画解説】2020年に読んだAI論文100本全部解説(俺的ベスト3付き) - Qiita

                この記事は私, wataokaが1年間をかけて作り続けた超大作記事です. 総文字数は8万を超えていますので, お好みのところだけでもみていってください. ついにこの時が来ました!!!!! 1年間書き続けたQiita記事です!!!!! ご覧下さい!!!!!https://t.co/eKBwP1zoeB — 綿岡 晃輝 (@Wataoka_Koki) December 31, 2020 俺的ランキング 動画での解説も挑戦してみました! ぜひぜひご覧下さい! 動画のリンク 第3位: Likelihood-Free Overcomplete ICA and Applications in Causal Discovery wataokaの日本語訳「尤度が必要ない過完備ICAと 因果探索における応用」 種類: ICA 学会: NeurIPS2019 日付: 20190904 URL: https:/

                  【動画解説】2020年に読んだAI論文100本全部解説(俺的ベスト3付き) - Qiita
                • IAM ロールで 100 連鎖してみた | DevelopersIO

                  俺達はいつまでも立ち尽くし見つめていた━━━ 数多の IAM ロールが移ろうように連鎖していく、そのさまを。 コンバンハ、「 IAM ロールはお面」おじさんです。 この世で最も大切なもの、それは繋がりであり、そして連なりですよね。 ということで、早速 IAM ロールで 10 連鎖してみました。 いや、せっかくなので 100 連鎖くらい行ってみましょうか。そうしましょう。興奮してきたな。 まとめ IAM ロールはそんな連鎖させるようなもんじゃない。 手始めに IAM ロールを 101 個作ろう 早速、 100 連鎖のために IAM ロールを 101 個作ります。 「 100 連鎖なのに 101 個なの?」と思うかもしれませんが、ヤマタノオロチの「股(首と首の間)」は 7 個しかありませんよね。(「岐」は 8 個あるんですけどね。)それと同じです。 101 個くらいの数なら「温かみのある手作業

                    IAM ロールで 100 連鎖してみた | DevelopersIO
                  • Building LLM applications for production

                    [Hacker News discussion, LinkedIn discussion, Twitter thread] Update: My upcoming book, AI Engineering (late 2024/early 2025) will cover building aplications with foundation models in depth. A question that I’ve been asked a lot recently is how large language models (LLMs) will change machine learning workflows. After working with several companies who are working with LLM applications and persona

                      Building LLM applications for production
                    • Performance comparison: counting words in Python, Go, C++, C, AWK, Forth, and Rust

                      Performance comparison: counting words in Python, Go, C++, C, AWK, Forth, and Rust March 2021 Summary: I describe a simple interview problem (counting frequencies of unique words), solve it in various languages, and compare performance across them. For each language, I’ve included a simple, idiomatic solution as well as a more optimized approach via profiling. Go to: Constraints | Python Go C++ C

                      • research!rsc: Coroutines for Go

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

                        • Introducing Amazon Managed Workflows for Apache Airflow (MWAA) | Amazon Web Services

                          AWS News Blog Introducing Amazon Managed Workflows for Apache Airflow (MWAA) As the volume and complexity of your data processing pipelines increase, you can simplify the overall process by decomposing it into a series of smaller tasks and coordinate the execution of these tasks as part of a workflow. To do so, many developers and data engineers use Apache Airflow, a platform created by the commun

                            Introducing Amazon Managed Workflows for Apache Airflow (MWAA) | Amazon Web Services
                          • 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
                            • 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

                              • CloudFormation 一撃で EC2 の Blue/Green Deployment の CodePipeline を構築する | DevelopersIO

                                準備 CodeCommitに以下をプッシュします。 なお、CodePipelineによる自動デプロイではファイル上書きデプロイを設定できないので、必要に応じて appspec.ymlで元のファイルを削除するように対応します。 ソースコード(index.html, hello.conf) appspec.yml (本稿では beforeInstall.sh を利用) ちなみに、index.html や hello.conf の素材は こちら を使っています。 参考 ## appspec.yml version: 0.0 os: linux files: - source: ./hello.conf destination: /etc/nginx/conf.d/ - source: ./index.html destination: /usr/share/nginx/html/ hooks:

                                  CloudFormation 一撃で EC2 の Blue/Green Deployment の CodePipeline を構築する | DevelopersIO
                                • ChatGPT (Advanced Data Analysis)でBNF式からパーサーを生成する - Taste of Tech Topics

                                  こんにちは、最近ピアノを習い始めた安部です。 今回は、ChatGPTのAdvanced Data Analysis (旧Code Interpreter)にBNF式を与えてパーサーを作成してもらおうと思います。 BNF式のように機械的に解釈可能なものであれば、正確にコードを生成してくれるのではないでしょうか? BNFでうまくいけば、その他の様々な形式のデータやフォーマットからパーサーを自動生成してくれることが期待できそうです。 1. BNFとは BNF(バッカス・ナウア記法)とは、プログラムの構文規則(文脈自由文法)を記述するための記法です。 正確な定義よりも具体例を見た方が早く理解できると思うので、例を示します。 『プログラム意味論』(横内寛文 著)の冒頭に登場する、非常に単純なプログラムを許容する言語の定義です。 <変数> ::= A | B | C | ... | Z <定数> ::

                                    ChatGPT (Advanced Data Analysis)でBNF式からパーサーを生成する - Taste of Tech Topics
                                  • MFA設定必須のCognitoのクロスアカウントマイグレーションについて - ZOZO TECH BLOG

                                    はじめに こんにちは、計測プラットフォーム開発本部SREブロックの近藤です。普段はZOZOMATやZOZOGLASS、ZOZOFITなどの計測技術に関わるシステムの開発、運用に携わっています。 計測プラットフォーム開発本部では、複数のプロダクトを運用していますが並行して新しいプロダクトも開発しています。SREチームでは増え続けるプロダクトの運用負荷に対して改善は行っていますが、さらなるプロダクトの拡張に備えてZOZOFITの開発運用を別チームへ移管することになりました。移管作業の中でAWSリソースを別チームが管理するAWSアカウントへ移行する作業が発生することになりました。本記事では移行時に遭遇した課題と、その課題の解決に至るまでの取り組みをご紹介します。 目次 はじめに 目次 背景・課題 調査 ユーザ移行Lambdaの作成 簡易ダイアグラム フローチャート ユーザ移行Lambdaの処理

                                      MFA設定必須のCognitoのクロスアカウントマイグレーションについて - ZOZO TECH BLOG
                                    • Basic Feature Engineering with DuckDB

                                      Introduction Data preprocessing is a necessary step in any machine learning workflow, affecting both the model’s effectiveness and the ease of maintenance. While scikit-learn is commonly used for preprocessing due to its integration with the broader Python ecosystem, DuckDB offers a practical alternative by enabling SQL-based data transformations within Python. Its declarative syntax supports modu

                                      • Go performance from version 1.2 to 1.18

                                        February 2022 Recently I improved the performance of GoAWK – my AWK interpreter written in Go – by switching from a tree-walking interpreter to a bytecode compiler with a virtual machine interpreter. While doing that, I thought it’d be interesting to see how much the performance of Go itself has improved over the years. There are many ways programs written in Go have gotten faster: the Go team and

                                        • Logica

                                          Logica is an open source declarative logic programming language for data manipulation. Logica extends syntax of logic programming for intuitive and efficient data manipulation. It compiles to SQL thus providing you access to the power of SQL engines with the convenience of logic programming syntax. Logica can compiles to SQL dialects of DuckDB, SQLite, Google BigQuery and Postgres. This makes it p

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

                                            • Agents

                                              Intelligent agents are considered by many to be the ultimate goal of AI. The classic book by Stuart Russell and Peter Norvig, Artificial Intelligence: A Modern Approach (Prentice Hall, 1995), defines the field of AI research as “the study and design of rational agents.” The unprecedented capabilities of foundation models have opened the door to agentic applications that were previously unimaginabl

                                                Agents
                                              • Structural pattern matching in Python 3.10

                                                September 2021 Summary: Python 3.10, which is due out in early October 2021, will include a large new language feature called structural pattern matching. This article is a critical but (hopefully) informative presentation of the feature, with examples based on real-world code. Go to: What it is | Where it shines | My code | Other projects | Problems | Wrapping up At a recent local Python meetup,

                                                • RFC 9562: Universally Unique IDentifiers (UUIDs)

                                                   Internet Engineering Task Force (IETF) K. Davis Request for Comments: 9562 Cisco Systems Obsoletes: 4122 B. Peabody Category: Standards Track Uncloud ISSN: 2070-1721 P. Leach University of Washington May 2024 Universally Unique IDentifiers (UUIDs) Abstract This specification defines UUIDs (Universally Unique IDentifiers) -- also known as GUIDs (Globally Unique IDentifiers) -- and a Uniform Resou

                                                    RFC 9562: Universally Unique IDentifiers (UUIDs)
                                                  • Prompt Engineering

                                                    Date: March 15, 2023 | Estimated Reading Time: 21 min | Author: Lilian Weng Prompt Engineering, also known as In-Context Prompting, refers to methods for how to communicate with LLM to steer its behavior for desired outcomes without updating the model weights. It is an empirical science and the effect of prompt engineering methods can vary a lot among models, thus requiring heavy experimentation a

                                                    • 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

                                                      • AST vs. Bytecode: Interpreters in the Age of Meta-Compilation

                                                        233 AST vs. Bytecode: Interpreters in the Age of Meta-Compilation OCTAVE LAROSE, University of Kent, UK SOPHIE KALEBA, University of Kent, UK HUMPHREY BURCHELL, University of Kent, UK STEFAN MARR, University of Kent, UK Thanks to partial evaluation and meta-tracing, it became practical to build language implementations that reach state-of-the-art peak performance by implementing only an interprete

                                                        • 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
                                                          • How I developed a faster Ruby interpreter | Red Hat Developer

                                                            In this article, I will describe my efforts to implement a faster interpreter for CRuby, the Ruby language interpreter, using a dynamically specialized internal representation (IR). I believe this article will interest developers trying to improve the interpreter performance of dynamic programming languages (e.g., CPython developers). I will cover the following topics: Existing CRuby interpreter a

                                                              How I developed a faster Ruby interpreter | Red Hat Developer
                                                            • 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
                                                              • Font with Built-In Syntax Highlighting

                                                                Note: I received a lot of great feedback from the discussions at Mastodon and Hacker News, so I've updated the post with some improvements to the font! I've also added some further examples and acknowledgements at the end. Syntax Highlighting in Hand-Coded Websites The problem I have been trying to identify practical reasons why hand-coding websites with HTML and CSS is so hard (by hand-coding, I

                                                                • Understanding AWS Lambda Proactive Initialization

                                                                  AWS Lambda warms up your functions, such that 50%-85% of Lambda Sandbox initializations don't increase latency for users. In this article we'll define Proactive Initialization, observe its frequency, and help you identify invocations where your cold starts weren't really that cold. July 13, 2023 This post is both longer and more popular than I anticipated, so I’ve decided to add a quick summary: T

                                                                    Understanding AWS Lambda Proactive Initialization
                                                                  • 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
                                                                    • 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
                                                                      • 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

                                                                        • February 2021 (version 1.54)

                                                                          Join a VS Code Dev Days event near you to learn about AI-assisted development in VS Code. Update 1.54.1: The update addresses an issue with an extension dependency. Update 1.54.2: The update addresses these issues. Update 1.54.3: The update addresses this issue. Downloads: Windows: x64 Arm64 | Mac: Universal Intel silicon | Linux: deb rpm tarball Arm snap Welcome to the February 2021 release of Vi

                                                                            February 2021 (version 1.54)
                                                                          • Patterns for Building LLM-based Systems & Products

                                                                            Patterns for Building LLM-based Systems & Products [ llm engineering production 🔥 ] · 66 min read Discussions on HackerNews, Twitter, and LinkedIn “There is a large class of problems that are easy to imagine and build demos for, but extremely hard to make products out of. For example, self-driving: It’s easy to demo a car self-driving around a block, but making it into a product takes a decade.”

                                                                              Patterns for Building LLM-based Systems & Products
                                                                            • The OpenSSL punycode vulnerability (CVE-2022-3602): Overview, detection, exploitation, and remediation | Datadog Security Labs

                                                                              emerging threats and vulnerabilities The OpenSSL punycode vulnerability (CVE-2022-3602): Overview, detection, exploitation, and remediation November 1, 2022 emerging vulnerability On November 1, 2022, the OpenSSL Project released a security advisory detailing a high-severity vulnerability in the OpenSSL library. Deployments of OpenSSL from 3.0.0 to 3.0.6 (included) are vulnerable and are fixed in

                                                                                The OpenSSL punycode vulnerability (CVE-2022-3602): Overview, detection, exploitation, and remediation | Datadog Security Labs
                                                                              • Terraformで構築する機械学習ワークロード(Batch on Fargate編) | DevelopersIO

                                                                                こんちには。 データアナリティクス事業本部 インテグレーション部 機械学習チームの中村です。 今回も「Terraformで構築する機械学習ワークロード」ということで、前回の記事ではLambdaを使いましたが、今回はその処理をBatch on Fargateに載せてみたいと思います。 前回記事は以下です。 構成イメージ 構成としては以下のようなものを作成していきます。 前回との違いとしては、まずLambdaの代わりにBatch on Fargateを使う点です。 Fargateのタスク(ジョブ)上のコンテナイメージで物体検出モデルの一つであるYOLOXを動かしていきます。 また、それ以外にもBatchを使用する場合は、S3イベントとBatchの間にEventBridgeが必要となります。 動作環境 Docker、Terraformはインストール済みとします。 Terraformを実行する際の

                                                                                  Terraformで構築する機械学習ワークロード(Batch on Fargate編) | DevelopersIO
                                                                                • 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