並び順

ブックマーク数

期間指定

  • から
  • まで

1 - 30 件 / 30件

新着順 人気順

python assign if not none elseの検索結果1 - 30 件 / 30件

  • ぼくのMac環境 ver.のんピ | DevelopersIO

    何年後かの自分へ こんにちは、のんピ(@non____97)です。 業務で使用する新しいMacが届きました。 新しいMacを初期セットアップするにあたって「今の設定どうだったっけ...」と調べる時間が結構かかってしまいました ということで何年後かの自分がまた新しいMacに乗り換える際に手間取らないように、設定した内容を書き記しておきます。 移行先のMacの情報は以下の通りです。M1 Max、嬉しい。 # OSのバージョンの確認 > sw_vers ProductName: macOS ProductVersion: 12.4 BuildVersion: 21F79 # カーネルのバージョン確認 > uname -r 21.5.0 # CPUのアーキテクチャの確認 > uname -m arm64 # CPUの詳細確認 > sysctl -a machdep.cpu machdep.cpu.

      ぼくのMac環境 ver.のんピ | DevelopersIO
    • Dear Rubyists: Shopify Isn’t Your Enemy

      I’ve been meaning to write a post about my perspective on Open Source and corporate entities. I already got the rough outline of it; however, I’m suffering from writer’s block, but more importantly, the whole post is a praise of how Shopify engages with Open Source communities. Hence, given the current climate, I don’t think I could publish it without addressing the elephant in the room first anyw

      • LangGraph を用いた LLM エージェント、Plan-and-Execute Agents の実装解説 - Algomatic Tech Blog

        はじめに こんにちは。Algomatic LLM STUDIO 機械学習エンジニアの宮脇(@catshun_)です。 Wang+’23 - A Survey on Large Language Model Based Autonomous Agents ChatGPT が発表されてからおよそ 1 年が経ち、AutoGPT, BabyAGI, HuggingGPT, Generative Agents, ChatDev, Mind2Web, Voyager, MetaGPT, Self-Recovery Prompting, OpenCodeInterpreter, AutoAgents などなど、大規模言語モデル (LLM) の抱負な知識および高度な推論能力を活用した LLM エージェント (AIエージェント) が発表されています。 直近ではコード生成からデバッグ、デプロイまで自律的に行う

          LangGraph を用いた LLM エージェント、Plan-and-Execute Agents の実装解説 - Algomatic Tech Blog
        • 「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
            • Python is a Compiled Language

              This blog post hopes to convince you that Python is a compiled language. And by “Python”, I don’t mean alternate versions of Python like PyPy, Mypyc, Numba, Cinder, or even Python-like programming languages like Cython, Codon, Mojo1—I mean the regular Python: CPython! The Python that is probably installed on your computer right now. The Python that you got when you searched “python” on Google and

              • 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

                      • NLP | GINZA v5で固有表現抽出のルール追加を試してみた|Koji Iino

                        「BERT/GPT-3/DALL-E 自然言語処理・画像処理・音声処理 人口知能プログラミング実践入門」を読んで、リクルートのAI研究機関「Megagon Labs」提供の「GINZA」という日本語の自然言語処理ライブラリがあることを知りました。 ※書籍へのリンクも記載していますが、このnoteは書籍の内容に従わずにあくまでも勝手に最新バージョンで試したことに対する内容です 興味を惹かれBERTくらいしか自然言語処理ライブラリの名前を知らなかったため興味を惹かれたのですが、書籍内のGINZAのバージョンは4.0.5であり少し古いバージョンでした。2021/08/26にv5がリリースされているようで、2021/10/01時点では最新は5.0.2 (2021/09/06)となっていました。 試そうとするもせっかく試すならば最新で試したいと思ったところ、v4からv5になった際にbraking c

                          NLP | GINZA v5で固有表現抽出のルール追加を試してみた|Koji Iino
                        • SRE2.0: LLMサービスの信頼性を測る新しい評価指標の紹介 | メルカリエンジニアリング

                          こんにちは。Fintech SREの佐藤隆広(@T)です。 この記事は、Merpay & Mercoin Tech Openness Month 2025 の11日目の記事です。 Google社が提唱し、Site Reliability Engineering Bookによって広く知られるようになったSREの信頼性マネジメントは、開発と運用の関係性を再定義し、SLI/SLOとエラーバジェットに始まり、Availability・Latency・エラーレート・トラフィック・リソース飽和度・耐久性といったような指標で補強されてきました。 ところが近年、大規模言語モデル(LLM)の進歩が著しく、サービスにLLMを利用する機会が増えることによって、 プロンプトを数行変えただけで回答品質が変動する Latencyやエラーレートが良好でも幻覚(ハルシネーション)が急増する モデルの軽微なアップデートで回

                            SRE2.0: LLMサービスの信頼性を測る新しい評価指標の紹介 | メルカリエンジニアリング
                          • 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

                                • PytorchのTransformersのT5を使って要約モデルを作る - 見習いデータサイエンティストの隠れ家

                                  インターネットの世界にニュースが溢れる昨今、満足度が高いものを的確に読みたいという方も多いかと思います。そのためには、見るニュースをどれにするか判断することが必要になります。そこで、ニュース全体の主旨を短い文章で表す要約の価値が高まっています。 自然言語処理における要約は、大きく2つに分けられます。それは、抽出型と抽象型です。抽出型は、文章の中から重要な文を抜き出すことで要約を作ります。要約として選ばれた文は元の文章にあるものなので、方向性が大きく異ることや誤字脱字がうまれる可能性は低いです。しかし、要約として選ばれた文のそれぞれは関係があるわけではないので、流暢な要約にならないことも多いです。それに対して、抽象型は人間が作るように要約としての文章の流暢さを考慮しながら作ります。本来人間がほしい要約はこちらになりますが、抽出型に比べると難易度が上がり、全く意味がわからない文章になる可能性も

                                    PytorchのTransformersのT5を使って要約モデルを作る - 見習いデータサイエンティストの隠れ家
                                  • 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

                                    • Who needs Graphviz when you can build it yourself?

                                      We recently overhauled our internal tools for visualizing the compilation of JavaScript and WebAssembly. When SpiderMonkey’s optimizing compiler, Ion, is active, we can now produce interactive graphs showing exactly how functions are processed and optimized. You can play with these graphs right here on this page. Simply write some JavaScript code in the test function and see what graph is produced

                                        Who needs Graphviz when you can build it yourself?
                                      • Azureの請求情報分析のためのデータを Python で取得してみました - Qiita

                                        概要 Azureの請求アカウントIDから請求データを取得するPythonプログラムです。このプログラムの応用編です。 請求月指定でデータを取得します 1000件以上のデータ取得に対応しました 取得データはCSVでローカルに保存します 実行環境 macOS Ventura 13.0 python 3.8.12 事前準備 この記事 の「事前準備」を完了していること 実行プログラム import json import os import sys import requests import argparse from datetime import * from dateutil.relativedelta import relativedelta import time import logging import pandas as pd import numpy as np # 請求管理者

                                          Azureの請求情報分析のためのデータを Python で取得してみました - Qiita
                                        • 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

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