並び順

ブックマーク数

期間指定

  • から
  • まで

1 - 40 件 / 85件

新着順 人気順

python return in if statement not workingの検索結果1 - 40 件 / 85件

  • REST API Design Best Practices Handbook – How to Build a REST API with JavaScript, Node.js, and Express.js

    By Jean-Marc Möckel I've created and consumed many API's over the past few years. During that time, I've come across good and bad practices and have experienced nasty situations when consuming and building API's. But there also have been great moments. There are helpful articles online which present many best practices, but many of them lack some practicality in my opinion. Knowing the theory with

      REST API Design Best Practices Handbook – How to Build a REST API with JavaScript, Node.js, and Express.js
    • 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
          • ソースコード & ドキュメントに対応したGraph RAGの実装(Tree-sitter + LightRAG)

            (module (function_definition (identifier) # ← ここに関数名「sample_func」が含まれます (parameters) (block (expression_statement (call (identifier) (argument_list (string)))))) (expression_statement (call (identifier) (argument_list)))) ノードが色々取れましたが、「function_definition」が関数、その子である「identifier」が関数名を表すため、 function_definition == 子ノード ==> identifier となっている箇所を探索すれば抽出できます(関数ではあっても「lambda」など異なる場合もあります)。 今回は上記のようにTree-si

              ソースコード & ドキュメントに対応したGraph RAGの実装(Tree-sitter + LightRAG)
            • Run WebAssemblies in VS Code for the Web

              June 5, 2023 by Dirk Bäumer VS Code for the Web (https://vscode.dev) has been available for some time now and it has always been our goal to support the full edit / compile / debug cycle in the browser. This is relatively easy for languages like JavaScript and TypeScript since browsers ship with a JavaScript execution engine. It is harder for other languages since we must be able to execute (and t

                Run WebAssemblies in VS Code for the Web
              • 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

                • 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
                  • How to create a Python package in 2022

                    Photo by Claudio Schwarz on Unsplash. How to create a Python package? In order to create a Python package, you need to write the code that implements the functionality you want to put in your package, and then you need to publish it to PyPI. That is the bare minimum. Nowadays, you can also set up a variety of other things to make your life easier down the road: continuous testing of your package;

                      How to create a Python package in 2022
                    • A few words on Ruby's type annotations state

                      I don't build systems. I imagine them, then write them. …that were written in a military training camp and accidentally grew to 5k words. I am writing this on my phone, in a barrack that houses some 200+ of my brothers-in-arms in the Ukrainian army’s training camp; I use short periods of rest between training, mostly at night and on Sundays. TBH, since joining the army, I didn’t expect to have tim

                      • 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
                          • 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
                                • 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
                                    • 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)
                                        • Parsing Protobuf at 2+GB/s: How I Learned To Love Tail Calls in C

                                          [Note: there have been several developments in this space since this article was published. See A Tail Calling Interpreter For Python (And Other Updates) for the latest information about this technique.] I just landed an exciting feature in the main branch of the Clang compiler. Using the [[clang::musttail]] or __attribute__((musttail)) statement attributes, you can now get guaranteed tail calls i

                                          • 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

                                            • Why People are Angry over Go 1.23 Iterators - gingerBill

                                              NOTE: This is based on, but completely rewritten, from a Twitter post: https://x.com/TheGingerBill/status/1802645945642799423 TL;DR It makes Go feel too “functional” rather than being an unabashed imperative language. I recently saw a post on Twitter showing the upcoming Go iterator design for Go 1.23 (August 2024). From what I can gather, many people seem to dislike the design. I wanted to give m

                                              • Lean for JavaScript Developers — overreacted

                                                Lean for JavaScript DevelopersSeptember 2, 2025 This is my opinionated syntax primer for the Lean programming language. It is far from complete and may contain inaccuracies (I’m still learning Lean myself) but this is how I wish I was introduced to it, and what I wish was clarified. Why Lean? This post assumes you’re already eager to learn a bit of Lean. For motivation, I humbly submit to you two

                                                  Lean for JavaScript Developers — overreacted
                                                • 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

                                                  • Guide for new ActivityPub implementers

                                                    This is an informal guide to help new implementers get up to speed with the ActivityPub specification (published as a W3C Recommendation) and how to build projects with ActivityPub support. Note: This is a Wiki Post that anyone can edit. Please help improve and extend this document ! What is ActivityPub? ActivityPub is a family of protocols, data models, and architectures useful for building decen

                                                      Guide for new ActivityPub implementers
                                                    • Andrej Karpathy — AGI is still a decade away

                                                      The Andrej Karpathy episode. Andrej explains why reinforcement learning is terrible (but everything else is much worse), why model collapse prevents LLMs from learning the way humans do, why AGI will just blend into the previous ~2.5 centuries of 2% GDP growth, why self driving took so long to crack, and what he sees as the future of education. Watch on YouTube; listen on Apple Podcasts or Spotify

                                                        Andrej Karpathy — AGI is still a decade away
                                                      • How to write a linter using tree-sitter in an hour

                                                        This article was discussed on Hacker News. This is a continuation of my last post on how to write a tree-sitter grammar in an afternoon. Building on the grammar we wrote, now we’re going to write a linter for Imp, and it’s even easier! The final result clocks in less than 60 SLOC and can be found here. Recall that tree-sitter is an incremental parser generator. That is, you give it a description o

                                                        • Graceful shutdowns with ECS | Amazon Web Services

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

                                                            Graceful shutdowns with ECS | Amazon Web Services
                                                          • 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
                                                            • State of the Common Lisp ecosystem, 2020 🎉 - Lisp journey

                                                              NEW: 9 videos (86min) about CLOS on my Common Lisp course. Out of 7h+ of content. Rated 4.7/5. Learn more and stay tuned. 🎥 I also have cool Lisp showcases on Youtube . The last ones: how to build a web app in Common Lisp, part 1 and 2. This is a description of the Common Lisp ecosystem, as of January, 2021, from the perspective of a user and contributor. The purpose of this article is both to gi

                                                              • 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

                                                                    • NumPy 2.0.0 Release Notes — NumPy v2.4.dev0 Manual

                                                                      Getting started What is NumPy? Installation NumPy quickstart NumPy: the absolute basics for beginners Fundamentals and usage NumPy fundamentals NumPy for MATLAB users NumPy tutorials NumPy how-tos Advanced usage and interoperability Using NumPy C-API F2PY user guide and reference manual Under-the-hood documentation for developers Interoperability with NumPy Extras Glossary Release notes 2.4.0 2.3.

                                                                      • 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
                                                                        • Tech Solvency: The Story So Far: CVE-2021-44228 (Log4Shell log4j vulnerability).

                                                                          Log4Shell log4j vulnerability (CVE-2021-44228 / CVE-2021-45046) - cheat-sheet reference guide Last updated: $Date: 2022/02/08 23:26:16 $ UTC - best effort, validate all for your environment/model before use, unofficial sources may be wrong by @TychoTithonus (Royce Williams), standing on the shoulders of many giants Send updates or suggestions (please include category / context / public (or support

                                                                          • We Spent $20 To Achieve RCE And Accidentally Became The Admins Of .MOBI

                                                                            Welcome back to another watchTowr Labs blog. Brace yourselves, this is one of our most astounding discoveries. SummaryWhat started out as a bit of fun between colleagues while avoiding the Vegas heat and $20 bottles of water in our Black Hat hotel rooms - has now seemingly become a major incident. We recently performed research that started off "well-intentioned" (or as well-intentioned as we ever

                                                                              We Spent $20 To Achieve RCE And Accidentally Became The Admins Of .MOBI
                                                                            • Announcing Masonry 0.1, and my vision for Rust UI

                                                                              When I see the landscape of native GUI in 2022, I feel like something is missing. I don’t just mean Rust UI. My frustrations with UI frameworks started long before I’d even heard of Rust. The origin story: Qt and fear The Qt framework is a C++ toolkit for writing GUI apps. In 2019, I spent a year working on a Qt project for an energy company, a diagram editor meant to be used by electrical enginee

                                                                              • Announcing PromptIDE

                                                                                An integrated development environment for prompt engineering and interpretability research. The xAI PromptIDE is an integrated development environment for prompt engineering and interpretability research. It accelerates prompt engineering through an SDK that allows implementing complex prompting techniques and rich analytics that visualize the network's outputs. We use it heavily in our continuous

                                                                                  Announcing PromptIDE
                                                                                • 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