並び順

ブックマーク数

期間指定

  • から
  • まで

1 - 34 件 / 34件

新着順 人気順

python assign value if not noneの検索結果1 - 34 件 / 34件

  • Deno で browser-use を自作してみた (勉強用)

    AI 経由でブラウザを操作する browser-use を deno で実装してみました。 元は python ですが、コア部分を自分で作れるように書き直しました。 注意: 勉強用の作例であって、本番で使えるものではないです。 以下の記事を読みながら実装しました tl;dr アクセシビリティ要素を列挙 各要素にブラウザ上でオーバーレイで操作用インデックスを書き込みつつ、インデックスに対応する xpath を作っておく claude のスクリーンショットと xpath を渡す claude に対応する xpath の操作方法を教える ツールとして対話的に実行 ステップ Tool Runner Puppeteer BrowesrTool Tool Runner まず、Tools を使って AI と対話する部分を作ります。 import { anthropic } from "@ai-sdk/a

      Deno で browser-use を自作してみた (勉強用)
    • チームで培われたベストプラクティスをlintとして周知する - エムスリーテックブログ

      こんにちは。AI・機械学習チームの氏家(@mowmow1259)です。 エムスリー福岡オフィスの一人目のエンジニアとして福岡で働いています。 マクドナルドの月見バーガーが好きで、今年も発売開始当日に食べに行きました。 私が所属するAI・機械学習チームでは基本的に2週間から1ヶ月程度で新規プロダクトをリリースするなど、高速にプロダクトを開発しています。 その過程で、「この書き方は落とし穴があるから使わない方がいい」といった開発に際したベストプラクティスが溜まっていきます。 そういったベストプラクティスはレビューでの指摘や技術共有会*1でチームに浸透してきますが、レビュー負荷や新メンバーへの周知などに課題がありました。 この記事では、それを解決するためにベストプラクティスをLinterの独自ruleとして規定し、CIで自動検知することでチーム全体に周知する取り組みについて紹介します。 独自ru

        チームで培われたベストプラクティスをlintとして周知する - エムスリーテックブログ
      • 「500年後に日本人が佐藤だけになる」という試算の問題と改善 - ill-identified diary

        この記事の要約 はじめに 問題点の要約 (追記) 先行研究について GARCH(っぽい)モデルによるシミュレーション シミュレーション前の理論分析 選択的夫婦別姓との比較 (追記) ゴルトン゠ワトソン分枝過程について 使用するデータ シミュレーションの技術的な補足 乱数生成について GARCHモデルの結果 シミュレーションの追試 より複雑なシミュレーションについて 男女別 世代重複 創作苗字 三親等の婚姻禁止ルール より高度な人口学的モデル 結論 2024/4/22: 先行研究とゴルトン゠ワトソン分枝過程の解説の追記 2024/4/23: 多数の言い回しのおかしい箇所の校正 2024/4/24: グラフ上の記載ミスとグラフ描画コードを修正 この記事の要約 先日報道された「500年後に日本人が佐藤だけになる」という試算の内容に違和感を覚えた. 資料を確認してみると, 大きな問題のある方法で試

          「500年後に日本人が佐藤だけになる」という試算の問題と改善 - ill-identified diary
        • 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 5.2 - TypeScript

            Today we’re excited to announce the release of TypeScript 5.2! If you’re not familiar with TypeScript, it’s a language that builds on top of JavaScript by making it possible to declare and describe types. Writing types in our code allows us to explain intent and have other tools check our code to catch mistakes like typos, issues with null and undefined, and more. Types also power TypeScript’s edi

              Announcing TypeScript 5.2 - TypeScript
            • 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
              • Announcing TypeScript 5.2 RC - TypeScript

                Today we’re excited to announce our Release Candidate of TypeScript 5.2! Between now and the stable release of TypeScript 5.2, we expect no further changes apart from critical bug fixes. To get started using the RC, you can get it through NuGet, or through npm with the following command: npm install -D typescript@rc Here’s a quick list of what’s new in TypeScript 5.2! using Declarations and Explic

                  Announcing TypeScript 5.2 RC - TypeScript
                • May 2025 (version 1.101)

                  Release date: June 12, 2025 Security update: The following extension has security updates: ms-python.python. Update 1.101.1: The update addresses these issues. Update 1.101.2: The update addresses these issues. Downloads: Windows: x64 Arm64 | Mac: Universal Intel silicon | Linux: deb rpm tarball Arm snap Welcome to the May 2025 release of Visual Studio Code. There are many updates in this version

                    May 2025 (version 1.101)
                  • Better Fbx Importer & Exporter

                    About Virus WarningThe Bitdefender Enterprise Support Team has verified that it is a false positive, here is the reply: Hello, Thank you for contacting the Bitdefender Enterprise Support Team. We have received an update from our laboratories. The files are clean and detection should be removed in the next couple of updates. Please let us know if there is anything else we can assist you with or if

                      Better Fbx Importer & Exporter
                    • Python's "Type Hints" are a bit of a disappointment to me

                      blog - git - desktop - images - contact Python's "Type Hints" are a bit of a disappointment to me 2022-04-21 Preface You are reading version 2.0 of this blog post. I've incorporated some feedback I got into this revised version. Introduction Over the course of several Python 3.x versions, "type hints" were introduced. You can now annotate functions: def greeting(name: str) -> str: return 'Hello '

                      • 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

                        • 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

                          • VSeeFace

                            Contents About Download Terms of use Credits VSFAvatar Tutorials Manual FAQ Virtual camera Transparency Network tracking Special blendshapes Expressions VMC protocol Model posing iPhone tracking Perception Neuron ThreeDPoseTracker Troubleshooting Preview in Unity Translations Running on Linux Troubleshooting Startup Tracking/Webcam Virtual camera Model issues Lipsync Game capture Log folder Perfor

                            • A leap year check in three instructions

                              With the following code, we can check whether a year 0 ≤ y ≤ 102499 is a leap year with only about 3 CPU instructions: bool is_leap_year_fast(uint32_t y) { return ((y * 1073750999) & 3221352463) <= 126976; } How does this work? The answer is surprisingly complex. This article explains it, mostly to have some fun with bit-twiddling; at the end, I'll briefly discuss the practical use. This is how a

                              • Where Programming, Ops, AI, and the Cloud are Headed in 2021

                                In this report, we look at the data generated by the O’Reilly online learning platform to discern trends in the technology industry—trends technology leaders need to follow. But what are “trends”? All too often, trends degenerate into horse races over languages and platforms. Look at all the angst heating up social media when TIOBE or RedMonk releases their reports on language rankings. Those repo

                                  Where Programming, Ops, AI, and the Cloud are Headed in 2021
                                • Announcing TypeScript 5.2 Beta - TypeScript

                                  Today we are excited to announce the availability of TypeScript 5.2 Beta. To get started using the beta, you can get it through NuGet, or through npm with the following command: npm install -D typescript@beta Here’s a quick list of what’s new in TypeScript 5.2! using Declarations and Explicit Resource Management Decorator Metadata Named and Anonymous Tuple Elements Easier Method Usage for Unions o

                                    Announcing TypeScript 5.2 Beta - TypeScript
                                  • 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

                                    • Deciphering Glyph :: Stop Writing `__init__` Methods

                                      The History Before dataclasses were added to Python in version 3.7 — in June of 2018 — the __init__ special method had an important use. If you had a class representing a data structure — for example a 2DCoordinate, with x and y attributes — you would want to be able to construct it as 2DCoordinate(x=1, y=2), which would require you to add an __init__ method with x and y parameters. The other opti

                                      • EC2インスタンスのユーザーデータ内のdnfコマンドやyumコマンドが失敗する場合の緩和策を考えてみた | DevelopersIO

                                        ユーザーデータでパッケージのインストールをしようとすると失敗するんだが こんにちは、のんピ(@non____97)です。 皆さんはEC2インスタンスのユーザーデータでdnfコマンドやyumコマンドが失敗したことはありますか? 私はあります。 具体的にはユーザーデータでdnf upgradeやdnf install パッケージ名を実行すると、以下のようにRPM: error: can't create transaction lock on /var/lib/rpm/.rpm.lock (Resource temporarily unavailable)とログが出力されます。 $ dnf upgrade -y --releasever=latest Amazon Linux 2023 repository 30 MB/s | 23 MB 00:00 Amazon Linux 2023 Ker

                                          EC2インスタンスのユーザーデータ内のdnfコマンドやyumコマンドが失敗する場合の緩和策を考えてみた | DevelopersIO
                                        • 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

                                          • Type Parameters Proposal

                                            Ian Lance Taylor Robert Griesemer August 20, 2021 StatusThis is the design for adding generic programming using type parameters to the Go language. This design has been proposed and accepted as a future language change. We currently expect that this change will be available in the Go 1.18 release in early 2022. AbstractWe suggest extending the Go language to add optional type parameters to type an

                                            • Python behind the scenes #11: how the Python import system works

                                              If you ask me to name the most misunderstood aspect of Python, I will answer without a second thought: the Python import system. Just remember how many times you used relative imports and got something like ImportError: attempted relative import with no known parent package; or tried to figure out how to structure a project so that all the imports work correctly; or hacked sys.path when you couldn

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

                                                • May 2023 (version 1.79)

                                                  Update 1.79.1: The update addresses this security issue. Update 1.79.2: The update addresses these issues. Downloads: Windows: x64 Arm64 | Mac: Universal Intel silicon | Linux: deb rpm tarball Arm snap Welcome to the May 2023 release of Visual Studio Code. There are many updates in this version that we hope you'll like, some of the key highlights include: Read-only mode - Mark specific files and f

                                                    May 2023 (version 1.79)
                                                  • Large Text Compression Benchmark

                                                     Large Text Compression Benchmark Matt Mahoney Last update: July 3, 2025. history This competition ranks lossless data compression programs by the compressed size (including the size of the decompression program) of the first 109 bytes of the XML text dump of the English version of Wikipedia on Mar. 3, 2006. About the test data. The goal of this benchmark is not to find the best overall compressi

                                                    • Practical SQL for Data Analysis

                                                      Pandas is a very popular tool for data analysis. It comes built-in with many useful features, it's battle tested and widely accepted. However, pandas is not always the best tool for the job. SQL databases have been around since the 1970s. Some of the smartest people in the world worked on making it easy to slice, dice, fetch and manipulate data quickly and efficiently. SQL databases have come such

                                                        Practical SQL for Data Analysis
                                                      • dlshogiのPyTorch Lightning対応 - TadaoYamaokaの開発日記

                                                        dlshogiの学習は、PyTorchを使用して、モデルの訓練処理を独自に実装していた。 マルチGPUによる分散学習に対応させようと考えているが、独自に実装するより、PyTorch lightningに対応させた方が実装が楽になるため、dlshogiをPyTorch Lightningに対応させたいと考えている。 まずは、訓練の基本部分の実装を行った。 PyTorch Lightning CLI ボイラープレートをできるだけ削除するため、PyTorch Lightning CLIを使用して実装する。 PyTorch Lightning CLIを使用すると、コマンド引数のパース処理など含めて自動で行ってくれる。 起動部分の処理は以下のように記述するだけでよい。 def main(): LightningCLI(Model, DataModule) if __name__ == "__main

                                                          dlshogiのPyTorch Lightning対応 - TadaoYamaokaの開発日記
                                                        • Using PyInstaller — PyInstaller 6.15.0 documentation

                                                          In the most simple case, set the current directory to the location of your program myscript.py and execute: PyInstaller analyzes myscript.py and: Writes myscript.spec in the same folder as the script. Creates a folder build in the same folder as the script if it does not exist. Writes some log files and working files in the build folder. Creates a folder dist in the same folder as the script if it

                                                          • Build and deploy ML inference applications from scratch using Amazon SageMaker | Amazon Web Services

                                                            Artificial Intelligence Build and deploy ML inference applications from scratch using Amazon SageMaker As machine learning (ML) goes mainstream and gains wider adoption, ML-powered inference applications are becoming increasingly common to solve a range of complex business problems. The solution to these complex business problems often requires using multiple ML models and steps. This post shows y

                                                              Build and deploy ML inference applications from scratch using Amazon SageMaker | Amazon Web Services
                                                            • Falling for Kubernetes

                                                              I've considered myself a strong kubernetes skeptic in the past. Bare metal is always my first choice both for projects and startups. That includes the stack that runs this blog. Calling it a stack might even be an exaggeration. It's a CI toolchain with an nginx configuration on the host. But it does its job, can handle surprising concurrent load, and is cheap to host. It costs just $10 a month and

                                                              • 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

                                                                  • Linear-time parser combinators

                                                                    My birthday just passed, and to relax I wrote a parser combinator library. Over the last few years, I have worked quite a bit with Ningning Xie and Jeremy Yallop on parser combinators, which has led to a family of parser combinators which have optimal linear-time performance in theory, and which are many times faster than lex+yacc in practice. But these use advanced multistage programming techniqu

                                                                    • Improving Diffusers Package for High-Quality Image Generation | Towards Data Science

                                                                      Overcoming token size limitations, custom model loading, LoRa support, textual inversion support, and more Stable Diffusion WebUI from AUTOMATIC1111 has proven to be a powerful tool for generating high-quality images using the Diffusion model. However, while the WebUI is easy to use, data scientists, machine learning engineers, and researchers often require more control over the image generation p

                                                                        Improving Diffusers Package for High-Quality Image Generation | Towards Data Science
                                                                      1