並び順

ブックマーク数

期間指定

  • から
  • まで

1 - 38 件 / 38件

新着順 人気順

python multiple or conditions in if statementの検索結果1 - 38 件 / 38件

  • 大実験!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
    • 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
      • 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
        • 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
          • 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
            • 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
              • 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)
                • 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

                  • Highlights from the Claude 4 system prompt

                    25th May 2025 Anthropic publish most of the system prompts for their chat models as part of their release notes. They recently shared the new prompts for both Claude Opus 4 and Claude Sonnet 4. I enjoyed digging through the prompts, since they act as a sort of unofficial manual for how best to use these tools. Here are my highlights, including a dive into the leaked tool prompts that Anthropic did

                      Highlights from the Claude 4 system prompt
                    • Eliciting Reasoning in Language Models with Cognitive Tools

                      arXiv:2506.12115v1 [cs.CL] 13 Jun 2025 Eliciting Reasoning in Language Models with Cognitive Tools Brown Ebouky IBM Research - Zurich ETH Zurich Brown.Ebouky@ibm.com Andrea Bartezzaghi IBM Research - Zurich abt@zurich.ibm.com Mattia Rigotti IBM Research - Zurich mrg@zurich.ibm.com Abstract The recent advent of reasoning models like OpenAI’s o1 was met with excited spec- ulation by the AI community

                      • Lesser Known PostgreSQL Features

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

                          Lesser Known PostgreSQL Features
                        • Manuel Cerón

                          Last year I finally decided to learn some Rust. The official book by Steve Klabnik and Carol Nichols is excellent, but even after reading it and working on some small code exercises, I felt that I needed more to really understand the language. I wanted to work on a small project to get some hands-on experience, but most of my ideas didn’t feel very well suited for Rust. Then I started reading the

                          • A guide to React design patterns - LogRocket Blog

                            Editor’s note: This guide to React design patterns was last reviewed for accuracy by Isaac Okoro on 12 April 2024. The article was also updated to add four more design patterns, covering prop combination, controlled components, forwardRefs, and conditional rendering. It was previously updated to include information about the render props pattern and state reducer pattern. Check out this article fo

                              A guide to React design patterns - LogRocket Blog
                            • Introducing PyTorch Monarch – PyTorch

                              We now live in a world where ML workflows (pre-training, post training, etc) are heterogeneous, must contend with hardware failures, are increasingly asynchronous and highly dynamic. Traditionally, PyTorch has relied on an HPC-style  multi-controller model, where multiple copies of the same script are launched across different machines, each running its own instance of the application (often refer

                              • prompts.chat

                                Welcome to the “Awesome ChatGPT Prompts” repository! While this collection was originally created for ChatGPT, these prompts work great with other AI models like Claude, Gemini, Hugging Face Chat, Llama, Mistral, and more. ChatGPT is a web interface created by OpenAI that provides access to their GPT (Generative Pre-trained Transformer) language models. The underlying models, like GPT-4o and GPT-o

                                • Rust on MIPS64 Windows NT 4.0

                                  Introduction Some part of me has always been fascinated with coercing code to run in weird places. I scratch this itch a lot with my security research projects. These often lead me to writing shellcode to run in kernels or embedded hardware, sometimes with the only way being through an existing bug. For those not familiar, shellcode is honestly hard to describe. I don’t know if there’s a very form

                                    Rust on MIPS64 Windows NT 4.0
                                  • 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の稼働時間を管理してみた
                                    • PEP 8 – Style Guide for Python Code | peps.python.org

                                      PEP 8 – Style Guide for Python Code Author: Guido van Rossum <guido at python.org>, Barry Warsaw <barry at python.org>, Alyssa Coghlan <ncoghlan at gmail.com> Status: Active Type: Process Created: 05-Jul-2001 Post-History: 05-Jul-2001, 01-Aug-2013 Table of Contents Introduction A Foolish Consistency is the Hobgoblin of Little Minds Code Lay-out Indentation Tabs or Spaces? Maximum Line Length Shoul

                                        PEP 8 – Style Guide for Python Code | peps.python.org
                                      • What's New in Emacs 28.1?

                                        Try Mastering Emacs for free! Are you struggling with the basics? Have you mastered movement and editing yet? When you have read Mastering Emacs you will understand Emacs. It’s that time again: there’s a new major version of Emacs and, with it, a treasure trove of new features and changes. Notable features include the formal inclusion of native compilation, a technique that will greatly speed up y

                                        • Vim9 script for Python Developers · GitHub

                                          vim9script4pythondevelopers.md Vim9 script for Python Developers Vim9 script�Vim script��������������������������������������������������系��� def������義����������Vim script��vim9script�����使����������(vim9script���

                                            Vim9 script for Python Developers · GitHub
                                          • Gregory Szorc's Digital Home | Rust is for Professionals

                                            A professional programmer delivers value through the authoring and maintaining of software that solves problems. (There are other important ways for professional programmers to deliver value but this post is about programming.) Programmers rely on various tools to author software. Arguably the most important and consequential choice of tool is the programming language. In this post, I will articul

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

                                              • Handling Concurrency Without Locks

                                                Concurrency is not very intuitive. You need to train your brain to consider what happens when multiple processes execute a certain code block at the same time. There are several issues I often encounter: Failing to recognize potential concurrency issues: It's not uncommon for both beginner and seasoned developers to completely miss a potential concurrency problem. When this happens, and the concur

                                                • The PSF has withdrawn a $1.5 million proposal to US government grant program

                                                  In January 2025, the PSF submitted a proposal to the US government National Science Foundation under the Safety, Security, and Privacy of Open Source Ecosystems program to address structural vulnerabilities in Python and PyPI. It was the PSF’s first time applying for government funding, and navigating the intensive process was a steep learning curve for our small team to climb. Seth Larson, PSF Se

                                                    The PSF has withdrawn a $1.5 million proposal to US government grant program
                                                  • If Not React, Then What? - Infrequently Noted

                                                    Over the past decade, my work has centred on partnering with teams to build ambitious products for the web across both desktop and mobile. This has provided a ring-side seat to a sweeping variety of teams, products, and technology stacks across more than 100 engagements. While I'd like to be spending most of this time working through improvements to web APIs, the majority of time spent with partne

                                                      If Not React, Then What? - Infrequently Noted
                                                    • Why APL is a language worth knowing

                                                      “A language that doesn't affect the way you think about programming, is not worth knowing.”, by Alan J. Perlis. Why APL is a language worth knowing Alan Perlis, the computer scientist recipient of the first Turing award, wrote “A language that doesn't affect the way you think about programming, is not worth knowing.” ― Alan J. Perlis, 1982. Special feature: Epigrams on programming. ACM Sigplan Not

                                                        Why APL is a language worth knowing
                                                      • K-Means Clustering for Unsupervised Machine Learning

                                                        K-means clustering is a type of unsupervised learning when we have unlabeled data (i.e., data without defined categories or groups). Clustering refers to a collection of data points based on specific similarities. K-Means AlgorithmK-means aims to find groups in the data, with the number of groups represented by the variable K. Based on the provided features, the algorithm works iteratively to assi

                                                          K-Means Clustering for Unsupervised Machine Learning
                                                        • Introducing AWS IoT SiteWise Edge | Amazon Web Services

                                                          The Internet of Things on AWS – Official Blog Introducing AWS IoT SiteWise Edge Note: SiteWise Edge is now generally available. Please see this blog post to get started with SiteWise Edge. From assembling automobiles to producing pharmaceuticals, successful industrial operations are fruits of continuous efforts to minimize equipment downtime, maximize product quality, and ensure personnel safety.

                                                            Introducing AWS IoT SiteWise Edge | Amazon Web Services
                                                          • JupyterLab Changelog — JupyterLab 4.5.0a3 documentation

                                                            JupyterLab Changelog# v4.4# JupyterLab 4.4 includes a number of new features (described below), bug fixes, and enhancements. This release is compatible with extensions supporting JupyterLab 4.0. Extension authors are encouraged to consult the Extension Migration Guide which lists deprecations and changes to the public API. Code console improvements# The code console prompt can now be positioned on

                                                            • How to Get or Create in PostgreSQL

                                                              "Get or create" is a very common operation for syncing data in the database, but implementing it correctly may be trickier than you may expect. If you ever had to implement it in a real system with real-life load, you may have overlooked potential race conditions, concurrency issues and even bloat! In this article I explore ways to "get ot create" in PostgresSQL. Illustration by Abstrakt Design Ta

                                                                How to Get or Create in PostgreSQL
                                                              • Automated Hydroponic System Build – Projects | Kyle Gabriel

                                                                Last Updated: August 28, 2022 Hydroponic farming is a method of growing crops without soil, with the main benefits of environmental and nutrient control, water conservation, and reduction of labor. This technique relies on a number of technologies that the principles of automation can be applied in order to improve yield and consistency. In this article and accompanying video, I’ll show you how to

                                                                • Python Interview Questions

                                                                  Here is a list of common Python interview questions with detailed answers to help you prepare for the interview as a Python developer. Python, with its versatile use cases and straightforward syntax, has seen its popularity growing continuously in software development, data science, artificial intelligence, and many other fields. As such, interviews for Python-related positions are designed not on

                                                                    Python Interview Questions
                                                                  • Implementing AWS Well-Architected best practices for Amazon SQS – Part 2 | Amazon Web Services

                                                                    AWS Compute Blog Implementing AWS Well-Architected best practices for Amazon SQS – Part 2 This blog is written by Chetan Makvana, Senior Solutions Architect and Hardik Vasa, Senior Solutions Architect. This is the second part of a three-part blog post series that demonstrates implementing best practices for Amazon Simple Queue Service (Amazon SQS) using the AWS Well-Architected Framework. This blo

                                                                      Implementing AWS Well-Architected best practices for Amazon SQS – Part 2 | Amazon Web Services
                                                                    • How to implement SaaS tenant isolation with ABAC and AWS IAM | Amazon Web Services

                                                                      AWS Security Blog How to implement SaaS tenant isolation with ABAC and AWS IAM April 25, 2023: We’ve updated this blog post to include more security learning resources. August 31, 2021: AWS KMS is replacing the term customer master key (CMK) with AWS KMS key and KMS key. The concept has not changed. To prevent breaking changes, AWS KMS is keeping some variations of this term. More info. Multi-tena

                                                                        How to implement SaaS tenant isolation with ABAC and AWS IAM | Amazon Web Services
                                                                      • Xortigate, or CVE-2023-27997 - The Rumoured RCE That Was

                                                                        When Lexfo Security teased a critical pre-authentication RCE bug in FortiGate devices on Saturday 10th, many people speculated on the practical impact of the bug. Would this be a true, sky-is-falling level vulnerability like the recent CVE-2022-42475? Or was it some edge-case hole, requiring some unusual and exotic requisite before any exposure? Others even went further, questioning the legitimacy

                                                                          Xortigate, or CVE-2023-27997 - The Rumoured RCE That Was
                                                                        • Django for Startup Founders: A better software architecture for SaaS startups and consumer apps

                                                                          In an ideal world, startups would be easy. We'd run our idea by some potential customers, build the product, and then immediately ride that sweet exponential growth curve off into early retirement. Of course it doesn't actually work like that. Not even a little. In real life, even startups that go on to become billion-dollar companies typically go through phases like: Having little or no growth fo

                                                                          • Philosophy of coroutines

                                                                            [Simon Tatham, initial version 2023-09-01, last updated 2025-03-25] [Coroutines trilogy: C preprocessor | C++20 native | general philosophy ] Introduction Why I’m so enthusiastic about coroutines The objective view: what makes them useful? Versus explicit state machines Versus conventional threads The subjective view: why do I like them so much? “Teach the student when the student is ready” They s

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