並び順

ブックマーク数

期間指定

  • から
  • まで

1 - 40 件 / 111件

新着順 人気順

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

  • 日本株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問題の攻撃手法まとめ - こんとろーるしーこんとろーるぶい
      • 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

                • Rails に Babel と Rollup を組み込んで CoffeeScript を JavaScript に段階的に移行した話 - クックパッド開発者ブログ

                  こんにちは。技術部クックパッドサービス基盤グループの青沼です。当グループではクックパッドのレシピサービスを支える web アプリケーションの改善を進めています。今回はフロントエンドの改善の一環として、 Babel と Rollup を Rails のアセットパイプラインに組み込み、レガシーな CoffeeScript ファイルを ES2015+ の JavaScript に移行した話をします。 レシピサービスと CoffeeScript の歴史 クックパッドは10年以上の歴史を持つサービスです。中でもレシピサービスの web アプリケーションは初期に作られた Rails 2 アプリケーションがアップグレードを重ねながら今も動いています。2018年には Rails 3 から4へ、つい最近では4から5へのアップグレードを完了しました。 Ruby のコードはそれに伴って新しい書き方へと徐々に移行

                    Rails に Babel と Rollup を組み込んで CoffeeScript を JavaScript に段階的に移行した話 - クックパッド開発者ブログ
                  • 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
                      • 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
                        • Every System is a Log: Avoiding coordination in distributed applications

                          Every System is a Log: Avoiding coordination in distributed applications How Restate works, Part 1Posted January 22, 2025 by Stephan Ewen and Jack Kleeman and Giselle van Dongen ‐ 13 min read 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 revi

                            Every System is a Log: Avoiding coordination in distributed applications
                          • 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
                                  • 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

                                    • 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

                                      • 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

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

                                                                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: Universal Intel silicon | Linux: deb rpm tarball Arm snap Welcome to the April 2025 release

                                                                  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
                                                                  • Advent of Code on the Nintendo DS

                                                                    It is December. That means annoying Christmas things are everywhere, including but not limited to the annual programming semi-competition known as Advent of Code. The problem with Advent of Code is that it is a waste of time. Most of the puzzles are in the realm of either string processing (somewhat applicable to programming), logic puzzles (not really applicable to most programming), or stupid go

                                                                    • 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

                                                                      • 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

                                                                              • The State of Python 2025 | The PyCharm Blog

                                                                                This is a guest post from Michael Kennedy, the founder of Talk Python and a PSF Fellow. Welcome to the highlights, trends, and key actions from the eighth annual Python Developers Survey. This survey is conducted as a collaborative effort between the Python Software Foundation and JetBrains’ PyCharm team. My name is Michael Kennedy, and I’ve analyzed the more than 30,000 responses to the survey an

                                                                                  The State of Python 2025 | The PyCharm Blog
                                                                                • Node.js

                                                                                  2023-10-17, Version 21.0.0 (Current), @RafaelGSS and @targos We're excited to announce the release of Node.js 21! Highlights include updates of the V8 JavaScript engine to 11.8, stable fetch and WebStreams, a new experimental flag to change the interpretation of ambiguous code from CommonJS to ES modules (--experimental-default-type), many updates to our test runner, and more! Node.js 21 will repl

                                                                                    Node.js