並び順

ブックマーク数

期間指定

  • から
  • まで

1 - 40 件 / 106件

新着順 人気順

python code for if else conditionの検索結果1 - 40 件 / 106件

  • 日本株3700社以上を分析。yfinance x「わが投資術」株式スクリーニングアプリを作った話(バイブコーディング)

    いきなりですが。 海外旅行したり働き始めたりすると、日本の良さが身に染みたと感じた人は多いんじゃないでしょうか? なんかとりあえず外で働いてみたいと思っていましたが、今はいつ戻るかと考える日々です。(とにかく温泉に入りたい) また色々と各国を回る中で、日本企業ってアジア圏や他の国にもかなり進出してるんだなぁと実感しました。(そりゃそう) そんなこんなで日本株に興味を持ち 昨年にわが投資術を購入して実践し始めました。(まだ初めて一年目なので成績はわかりません。。。が、マイナスは無し) 自分でバフェットコードや Claude mcp-yfinance などを利用しながらスクリーニングしてみましたが、毎回決算が出るたびに手動とチャット相手にあるのも何かなぁ。と思いまして。 じゃあ自動収集とスクリーニング用のアプリ作ってみよう(vibe coding) そんなノリから、日本株全銘柄を自動収集・簡易

      日本株3700社以上を分析。yfinance x「わが投資術」株式スクリーニングアプリを作った話(バイブコーディング)
    • 【2020年】CTF Web問題の攻撃手法まとめ - こんとろーるしーこんとろーるぶい

      はじめに 対象イベント 読み方、使い方 Remote Code Execution(RCE) 親ディレクトリ指定によるopen_basedirのバイパス PHP-FPMのTCPソケット接続によるopen_basedirとdisable_functionsのバイパス JavaのRuntime.execでシェルを実行 Cross-Site Scripting(XSS) nginx環境でHTTPステータスコードが操作できる場合にCSPヘッダーを無効化 GoogleのClosureLibraryサニタイザーのXSS脆弱性 WebのProxy機能を介したService Workerの登録 括弧を使わないXSS /記号を使用せずに遷移先URLを指定 SOME(Same Origin Method Execution)を利用してdocument.writeを順次実行 SQL Injection MySQ

        【2020年】CTF Web問題の攻撃手法まとめ - こんとろーるしーこんとろーるぶい
      • MCPでやる必要のない業務をSkillsに置き換えてトークンと時間の消費を爆減してみた

        こんにちは。ダイの大冒険エンジョイ勢のbun913と申します。私はSDET(Software Development Engineer in Test)として、QAチームにいる何でも屋さんとして、私より優秀なみなさんが本質的なことに時間を使えるように日夜改善を考えています。 私は弊QAチームでのMCP活用として以下のような記事を書いておりました。 今回は最近話題の Agent Skills とあらかじめ作っておいたCLIツールを組み合わせて、QAチームが本質的ではない作業にかける時間とトークン消費量を大幅に削減する試みを紹介します。 内容自体はQAチームの取り組みですが、考え方やツールの使い方は他のことに流用できるのではないかと考えています。 先に背景とやったことをざっくり説明 背景: 前回までの取り組み 弊チームでは自動テストに力をいれつつも、手動テストの威力も大事にしています。実際探索

          MCPでやる必要のない業務をSkillsに置き換えてトークンと時間の消費を爆減してみた
        • Building a highly-available web service without a database

          If you’ve ever built a web service or a web app, you know the drill: pick a database, pick a web service framework (and in today’s day and age, pick a front-end framework, but let’s not get into that). This has been the case for several decades now, and people don’t stop to question if this is still the best way to build a web app. Many things have changed in the last decade: Disk is a lot faster

            Building a highly-available web service without a database
          • The Prompt Engineering Playbook for Programmers

            Developers are increasingly relying on AI coding assistants to accelerate our daily workflows. These tools can autocomplete functions, suggest bug fixes, and even generate entire modules or MVPs. Yet, as many of us have learned, the quality of the AI’s output depends largely on the quality of the prompt you provide. In other words, prompt engineering has become an essential skill. A poorly phrased

              The Prompt Engineering Playbook for Programmers
            • neue cc - Claudia - Anthropic ClaudeのC# SDKと現代的なC#によるウェブAPIクライアントの作り方

              AI関連、競合は現れども、性能的にやはりOpenAI一強なのかなぁというところに現れたAnthropic Claude 3は、確かに明らかに性能がいい、GPT-4を凌駕している……!というわけで大いに気に入った(ついでに最近のOpenAIのムーブが気に入らない)ので、C#で使い倒していきたい!そこで、まずはSDKがないので非公式SDKを作りました。こないだまでプレビュー版を流していたのですが、今回v1.0.0として出します。ライブラリ名は、Claudeだから、Claudiaです!.NET全般で使えるのと、Unity(Runtime/Editor双方)でも動作確認をしているので、アイディア次第で色々活用できると思います。 GitHub - Cysharp/Claudia 今回のSDKを作るにあたっての設計指針の一番目は、公式のPython SDKやTypeScript SDKと限りなく似せる

              • MCP Python SDK のドキュメント|npaka

                以下の記事が面白かったので、簡単にまとめました。 ・modelcontextprotocol/python-sdk 1. 概要「MCP」を使用すると、アプリケーションは標準化された方法でLLMにコンテキストを提供できます。これにより、コンテキストの提供とLLMとの実際のやり取りを分離できます。「Python SDK」はMCP仕様を完全に実装しており、以下のことが容易になります。 ・任意のMCPサーバに接続できるMCPクライアントの構築 ・リソース、プロンプト、ツールを公開するMCPサーバの作成 ・stdio、SSE、Streamable HTTPなどの標準トランスポートの使用 ・すべてのMCPプロトコルメッセージとライフサイクルイベントの処理 2. インストール2-1. PythonプロジェクトにMCPを追加Pythonプロジェクトの管理には「uv」が推奨されています。 (1) プロジェク

                  MCP Python SDK のドキュメント|npaka
                • GPT in 60 Lines of NumPy | Jay Mody

                  January 30, 2023 In this post, we'll implement a GPT from scratch in just 60 lines of numpy. We'll then load the trained GPT-2 model weights released by OpenAI into our implementation and generate some text. Note: This post assumes familiarity with Python, NumPy, and some basic experience with neural networks. This implementation is for educational purposes, so it's missing lots of features/improv

                  • PythonでもできるJavaベースの設計原則:「良いコード/悪いコードで学ぶ設計入門」をPydanticで実装する - Insight Edge Tech Blog

                    はじめに こんにちは。Insight Edgeでデータサイエンティストをしている善之です。 「Pythonで堅牢なコードを書きたいけど、どう設計すればいいんだろう…」 「バリデーション漏れや予期せぬバグに悩まされている…」 「Javaの設計原則は聞いたことあるけど、Pythonでも同じことができるの?」 こんな疑問や課題を持ったことはありませんか? 先日、名著「良いコード/悪いコードで学ぶ設計入門」を読んで、その設計原則に感銘を受けました。 しかし、この書籍はサンプルコードがJavaで書かれており、Pythonでどう実装すればいいか悩みました。 そこで実際のプロジェクトで、これらの原則をPydanticを使ってPythonで実装する工夫を行ったところ、非常に効果的だったため、そのノウハウをご紹介します。 本記事は、Pythonでより堅牢なコード設計を学びたいエンジニアや、Javaの設計原則

                      PythonでもできるJavaベースの設計原則:「良いコード/悪いコードで学ぶ設計入門」をPydanticで実装する - Insight Edge Tech Blog
                    • Amazon SESのメール受信機能を使って、定型業務を自動化してみた - NRIネットコムBlog

                      はじめに 構成 作ってみた Amazon Route53によるドメイン登録 SESのドメイン認証 CloudFormationで作成するリソース Route53によるMXレコードの公開 SES受信ルール作成 メール保存用のS3バケット作成 S3に保存されたメールの内容を取得し、Slackに通知するLambda 転送設定 動作確認 困ったこと どの権限を与えればよいか分からない CloudFormationの構築手順を意識する おわりに はじめに はじめまして、入社1年目の藤本です。8月にクラウド事業推進部に配属され、AWSを用いた業務に日々奮闘しています。 私は、AWSの学習の一環として社内の勉強会に参加しています。この勉強会の内容はメールで送信されるのですが、案内のメールに気付いた人が自主的にSlackのAWSに関するチャンネルに投稿して周知する仕組みとなっています。しかし、この作業は手

                        Amazon SESのメール受信機能を使って、定型業務を自動化してみた - NRIネットコムBlog
                      • 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
                        • Every System is a Log: Avoiding coordination in distributed applications | Restate

                          BlogEvery System is a Log: Avoiding coordination in distributed applications Building resilient distributed applications remains a tough challenge. It should be possible to focus almost entirely on the business logic and the complexity inherent to the domain. Instead, you need to review line-by-line and check: “what if the service crashes here?”, “what if the API we call here is temporarily unavai

                            Every System is a Log: Avoiding coordination in distributed applications | Restate
                          • Beyond agentic coding

                            I'm generally pretty pro-AI with one major exception: agentic coding. My consistent impression is that agentic coding does not actually improve productivity and deteriorates the user's comfort and familiarity with the codebase. I formed that impression from: my own personal experiences Every time I use agentic coding tools I'm consistently unimpressed with the quality of the results. my experience

                              Beyond agentic coding
                            • Claude Mythos Preview \ red.anthropic.com

                              Assessing Claude Mythos Preview’s cybersecurity capabilities April 7, 2026 Nicholas Carlini, Newton Cheng, Keane Lucas, Michael Moore, Milad Nasr, Vinay Prabhushankar, Winnie Xiao Hakeem Angulu, Evyatar Ben Asher, Jackie Bow, Keir Bradwell, Ben Buchanan, David Forsythe, Daniel Freeman, Alex Gaynor, Xinyang Ge, Logan Graham, Kyla Guru, Hasnain Lakhani, Matt McNiece, Mojtaba Mehrara, Renee Nichol, A

                              • 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
                                • 4 Pandas Anti-Patterns to Avoid and How to Fix Them

                                  pandas is a powerful data analysis library with a rich API that offers multiple ways to perform any given data manipulation task. Some of these approaches are better than others, and pandas users often learn suboptimal coding practices that become their default workflows. This post highlights four common pandas anti-patterns and outlines a complementary set of techniques that you should use instea

                                    4 Pandas Anti-Patterns to Avoid and How to Fix Them
                                  • Announcing TypeScript 4.8 - TypeScript

                                    Today we’re excited to announce the release of TypeScript 4.8! If you’re not yet familiar with TypeScript, it’s a language that builds on JavaScript and adds syntax for types. These types let you put your expectations and assumptions into your code, and those assumptions can then be checked by the TypeScript type-checker. This checking can help avoid typos, calling uninitialized values, mixing up

                                      Announcing TypeScript 4.8 - TypeScript
                                    • 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
                                      • Vibe physics: The AI grad student

                                        Can AI do theoretical physics? In this guest post, professor of physics Matthew Schwartz decided to find out by supervising Claude through a real research calculation, start to finish, without ever touching a file himself. His account of what happened is below. SummaryI guided Claude Opus 4.5 through a real theoretical physics calculation, encapsulating the complexity of code and computations behi

                                          Vibe physics: The AI grad student
                                        • 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

                                          • Font with Built-In Syntax Highlighting

                                            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 mean not relying on frameworks, generators or 3rd party scripts that modify the DOM). Let's say, I want to make a blog. What are the actual things that prevent me from making—and maintaining—it by hand? What would it take t

                                            • syntaxdesign

                                              One of the most recognizable features of a languages is its syntax. What are some of the things about syntax that matter? What questions might you ask if you were creating a syntax for your own language? Motivation A programming language gives us a way structure our thoughts. Each program, has a kind of internal structure, for example: How can we capture this structure? One way is directly, via pi

                                              • Recto — a truly 2D language

                                                Masato Hagiwara Open in Recto Pad Google Colab Github Recto Pad TL;DR Recto is a 2D programming language that uses nested rectangles as its core syntax, encoding structure and recursion directly in space instead of a linear stream of text. Recto explores new ways to write, parse, and reason about code—and even natural language—spatially. Introduction Open in Recto Pad Virtually all the languages w

                                                  Recto — a truly 2D language
                                                • 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

                                                  • 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
                                                    • Open Source Gave Me Everything Until I Had Nothing Left to Give

                                                      Open Source Gave Me Everything Until I Had Nothing Left to Give I thought I was having a spiritual awakening. I was having a psychiatric emergency. I was at a tech conference in Sweden when it started. I hadn't slept in days. I was one of the most prolific open source developers in the Python ecosystem, maintaining the most downloaded HTTP library on Earth, keynoting conferences across the world,

                                                        Open Source Gave Me Everything Until I Had Nothing Left to Give
                                                      • 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
                                                        • 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
                                                          • Announcing TypeScript 4.8 Beta - TypeScript

                                                            Today we’re announcing our beta release of TypeScript 4.8! To get started using the beta, you can get it through NuGet, or- use npm with the following command: npm install -D typescript@beta You can also get editor support by Downloading for Visual Studio 2022/2019 Following directions for Visual Studio Code. Here’s a quick list of what’s new in TypeScript 4.8! Improved Intersection Reduction, Uni

                                                              Announcing TypeScript 4.8 Beta - TypeScript
                                                            • Rust: A Critical Retrospective « bunnie's blog

                                                              Since I was unable to travel for a couple of years during the pandemic, I decided to take my new-found time and really lean into Rust. After writing over 100k lines of Rust code, I think I am starting to get a feel for the language and like every cranky engineer I have developed opinions and because this is the Internet I’m going to share them. The reason I learned Rust was to flesh out parts of t

                                                              • 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
                                                                • The joy of building a ray tracer, for fun, in Rust. // flurries of latent creativity

                                                                  TLDR? You can find the code and a bunch of examples on GitHub at dps/rust-raytracer. Over the holiday break, I decided to learn Rust. Rust is a modern systems programming language which has a really interesting type system. The type system can catch broad classes of common programming mistakes - e.g. ensuring memory is accessed safely - at compile time while generating tight, performant machine co

                                                                    The joy of building a ray tracer, for fun, in Rust. // flurries of latent creativity
                                                                  • World's First MIDI Shellcode

                                                                    World’s First MIDI Shellcode Jan 2025 · 45 min read I gained remote code execution via MIDI messages to trick my synth into playing Bad Apple on its LCD. This blog post is about my journey with this reverse engineering project. Final iteration of Bad Apple The beginning I’ve had this Yamaha PSR-E433 synth for a very long time, and a couple of years ago I decided to open it up — partly because it w

                                                                    • 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

                                                                      • April 2025 (version 1.100)

                                                                        Version 1.108 is now available! Read about the new features and fixes from December. Release date: May 8, 2025 Update: Enable Next Edit Suggestions (NES) by default in VS Code Stable (more...). Update 1.100.1: The update addresses these security issues. Update 1.100.2: The update addresses these issues. Update 1.100.3: The update addresses these issues. Downloads: Windows: x64 Arm64 | Mac: Univers

                                                                          April 2025 (version 1.100)
                                                                        • 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
                                                                          • The Go Programming Language and Environment – Communications of the ACM

                                                                            Go is a programming language created at Google in late 2007 and released as open source in November 2009. Since then, it has operated as a public project, with contributions from thousands of individuals and dozens of companies. Go has become a popular language for building cloud infrastructure: Docker, a Linux container manager, and Kubernetes, a container deployment system, are core cloud techno

                                                                            • "�[31m"?! ANSI Terminal security in 2023 and finding 10 CVEs

                                                                              This paper reflects work done in late 2022 and 2023 to audit for vulnerabilities in terminal emulators, with a focus on open source software. The results of this work were 10 CVEs against terminal emulators that could result in Remote Code Execution (RCE), in addition various other bugs and hardening opportunities were found. The exact context and severity of these vulnerabilities varied, but some

                                                                              • The Architecture of a Modern Startup | by Dmitry Kruglov | Nov, 2022 | Better Programming

                                                                                workflow — all images by authorThe Tech side of startups can sometimes be very fluid and contain a lot of unknowns. What tech stack to use? Which components might be overkill for now but worth keeping an eye on in the future? How to balance the pace of business features development while keeping the quality bar high enough to have a maintainable codebase? Here I want to share our experience buildi

                                                                                  The Architecture of a Modern Startup | by Dmitry Kruglov | Nov, 2022 | Better Programming
                                                                                • Solving Quantitative Reasoning Problems With Language Models

                                                                                  Solving Quantitative Reasoning Problems with Language Models Aitor Lewkowycz∗, Anders Andreassen†, David Dohan†, Ethan Dyer†, Henryk Michalewski†, Vinay Ramasesh†, Ambrose Slone, Cem Anil, Imanol Schlag, Theo Gutman-Solo, Yuhuai Wu, Behnam Neyshabur∗, Guy Gur-Ari∗, and Vedant Misra∗ Google Research Abstract Language models have achieved remarkable performance on a wide range of tasks that require