並び順

ブックマーク数

期間指定

  • から
  • まで

1 - 40 件 / 247件

新着順 人気順

if else in for loop pythonの検索結果1 - 40 件 / 247件

  • Minimal safe Bash script template

    Published on December 14, 2020   ·   Updated on December 16, 2020 Bash scripts. Almost anyone needs to write one sooner or later. Almost no one says “yeah, I love writing them”. And that’s why almost everyone is putting low attention while writing them. I won’t try to make you a Bash expert (since I’m not a one either), but I will show you a minimal template that will make your scripts safer. You

      Minimal safe Bash script template
    • とほほのHaskell入門 - とほほのWWW入門

      概要 Haskellとは 関数型言語 純粋関数型言語 インストール Haskell Stack Hello world 基本 予約語 コメント ブロック レイアウト 入出力 型 変数 数値 文字(Char) 文字列(String) エスケープシーケンス リスト([...]) タプル((...)) 演算子 関数 演算子定義 再帰関数 ラムダ式 パターンマッチ ガード条件 関数合成(.) 引数補足(@) 制御構文 do文 let文 if文 case文 where文 import文 ループ データ型 データ型(列挙型) データ型(タプル型) データ型(直和型) 新型定義 (newtype) 型シノニム (type) 型クラス (class) メイビー(Maybe) ファンクタ(Functor) アプリケイティブ(Applicative) モナド(Monad) モジュール (module) 高階関

      • CPUエミュレータをRustで自作する - Don't Repeat Yourself

        この記事は Rust Advent Calendar 2020 ならびに CyberAgent Developers Advent Calendar 25日目の記事です。 今年のはじめの頃になりますが、『CPUの創り方』という本に載っている TD4 という CPU を実装してみました。TD4 は「とりあえず動作するだけの4bit CPU」の略です。この本に載っている CPU エミュレータを実際に実装してみました。ただし、本書には GUI が載っていましたが、それは省略しました。 CPUの創りかた 作者:渡波 郁発売日: 2003/10/01メディア: 単行本(ソフトカバー) 「最近話題の RISC-V などの CPU エミュレータを作ってみたいものの、いきなり作るにはハードルが高い。何か簡単なもので素振りをして CPU の動作の仕組みをまずは知りたい」という方にはかなりオススメできる教材だ

          CPUエミュレータをRustで自作する - Don't Repeat Yourself
        • Pythonで理解するMCP(Model Context Protocol) | gihyo.jp

          動作環境 Python 3.12 ライブラリの使用バージョン gradio 5.34.2 anthropic 0.54.0 mcp 1.9.4 python-dotenv 1.1.0 仮想環境とライブラリインストール % cd mcp-host-with-gradio % python3 -m venv venv % source venv/bin/activate (venv) % pip install gradio anthropic mcp dotenv .envファイルの設定 AnthropicのAPIキーが必要です。APIキーの作成は以下を参考にしてください。APIの利用には料金がかかりますが、API従量課金であれば5ドルから始めることが可能です。 Claudeを使い始める -Anthropic .env ANTHROPIC_API_KEY=xxxxxxxxxxxxxxxxxx

            Pythonで理解するMCP(Model Context Protocol) | gihyo.jp
          • N番目の素数を求める - すぎゃーんメモ

            SNSなどで話題になっていたので調べてみたら勉強になったのでメモ。 環境 Pythonでの実装例 例1 例2 例3 エラトステネスの篩 Rustでの実装例 試し割り法 エラトステネスの篩 アトキンの篩 おまけ: GMP Benchmark 高速化のテクニック 上限個数を見積もる Wheel factorization オチ Repository References 環境 手元のMacBook Pro 13-inchの開発機で実験した。 2.8 GHz Intel Core i7 16 GB 2133 MHz LPDDR3 Pythonでの実装例 例1 最も単純に「2以上p未満のすべての数で割ってみて余りが0にならなかったら素数」とする、brute force 的なアプローチ。 import cProfile import io import pstats import sys def m

              N番目の素数を求める - すぎゃーんメモ
            • とほほのRust入門 - とほほのWWW入門

              Rustとは インストール Hello world Cargoプロジェクト キーワード コメント(//) 値 変数・定数(let, mut, const) 型 基本の型(bool, i16, char, str...) 型変換(as) 構造体(struct) 共用体(union) 列挙型(enum) タプル(tup) 配列(array) ベクタ(vec) ハッシュマップ(HashMap) 文字列(&str, String) 演算子(+ - ...) ヒープ領域(Box) スライス(&var[n..m]) 関数(fn) クロージャー(|...|{...}) マクロ(macro_rules!) 制御構文 条件分岐(if) 繰り返し(while) 繰り返し(for) ループ(loop) ループ制御(break, continue) マッチ(match) インプリメンテーション(impl) トレイ

              • 防衛省サイバーコンテスト 2025 writeup - st98 の日記帳 - コピー

                2/2に12時間というちょうどよい競技時間で開催された。21時終了だったけれども、11時45分ぐらいに最速で全完して1位🎉 第1回以来4年ぶりの優勝だ。昨年大会の第4回ではヒントの閲覧数で優勝を逃してしまって悔しい思いをしたので、雪辱を果たすことができ嬉しい。開始直後からずっと1位を独走できており、450名以上のプレイヤーがいる中で圧勝だったのも嬉しい。 昨年度や一昨年度はバルクが作問を担当していたが、今回はAGESTが担当していた。これまでの問題と比較すると全体的に易化したように思うが、解くにあたって発想の大きな飛躍を必要とするいわゆる「エスパー要素」のある問題はごく一部を除いて存在しておらず*1、よかったと思う。また、昨年度・一昨年度に引き続きwriteupは公開可能というのもよかった。 戦略というほどの戦略は立てていなかったけれども、とりあえずWebを見た後は全カテゴリを上から見て

                  防衛省サイバーコンテスト 2025 writeup - st98 の日記帳 - コピー
                • Building a tiny Linux from scratch

                  Last week, I built a tiny Linux system from scratch, and booted it on my laptop! Here’s what it looked like: Let me tell you how I got there. I wanted to learn more about how the Linux kernel works, and what’s involved in booting it. So I set myself the goal to cobble together the bare neccessities required to boot into a working shell. In the end, I had a tiny Linux system with a size of 2.5 MB,

                    Building a tiny Linux from scratch
                  • Microsoft Power Automate DesktopでRPAを実現してみる | 🌴 officeの杜 🥥

                    自分自身の個人的意見としては、エンドユーザコンピューティングは大いに結構だと思ってるけれど、一方で日本でジリジリと熱さが消えつつある国内の有象無象のRPAについては滅んだほうが良いとも思ってる。理由は後述するとして、本日良いニュースが発表されました。Power Automate Desktopについて追加費用無し無償で利用可能になるとのこと。これは既にあるMicrosoft365のEnterpriseプランなどに標準で利用できてるPower Automateのデスクトップ版のようで、Windows10に標準でついてくるようになるとのこと。 ということで、現時点のMicrosoft365で使えてるPower Automate Desktopを使ってみて、どんな感じなのか?またリリース後にその違いなどをここに記述していこうかなと思っています。また、Seleniumベースのウェブ自動化についても

                      Microsoft Power Automate DesktopでRPAを実現してみる | 🌴 officeの杜 🥥
                    • 遅くないpandasの書き方 - ML_BearのKaggleな日常

                      これは何? この記事は Kaggle Advent Calendar 2021 の7日目の記事です。 pandasはデータ分析ライブラリとして非常に便利ですが、書き方を間違えると簡単に処理が遅くなってしまうという欠点があります。そこで、この記事では遅くならない書き方をするために気をつけたいポイントをいくつかご紹介したいと思います。 この Colab Notebookの実行結果をエクスポートした上で、不要な部分を一部削って記事にしています。colab notebook をコピーして実行してもらえれば再現することが可能なはずです。(colabにコメント等をいただいても返すことはできないと思います、すみません。) 前提条件 この記事ではあくまで「遅くない(なりづらい)書き方を紹介する」ことに努めます。よって、以下のような改善点はあるが一旦考慮の外におくものとして話を進めます。 並列化ライブラリ

                        遅くないpandasの書き方 - ML_BearのKaggleな日常
                      • Agentic Coding Recommendations

                        There is currently an explosion of people sharing their experiences with agentic coding. After my last two posts on the topic, I received quite a few questions about my own practices. So, here goes nothing. Preface For all intents and purposes, here’s what I do: I predominently use Claude Code with the cheaper Max subscription for $100 a month 1. That works well for several reasons: I exclusively

                          Agentic Coding Recommendations
                        • IAM ロールで 100 連鎖してみた | DevelopersIO

                          俺達はいつまでも立ち尽くし見つめていた━━━ 数多の IAM ロールが移ろうように連鎖していく、そのさまを。 コンバンハ、「 IAM ロールはお面」おじさんです。 この世で最も大切なもの、それは繋がりであり、そして連なりですよね。 ということで、早速 IAM ロールで 10 連鎖してみました。 いや、せっかくなので 100 連鎖くらい行ってみましょうか。そうしましょう。興奮してきたな。 まとめ IAM ロールはそんな連鎖させるようなもんじゃない。 手始めに IAM ロールを 101 個作ろう 早速、 100 連鎖のために IAM ロールを 101 個作ります。 「 100 連鎖なのに 101 個なの?」と思うかもしれませんが、ヤマタノオロチの「股(首と首の間)」は 7 個しかありませんよね。(「岐」は 8 個あるんですけどね。)それと同じです。 101 個くらいの数なら「温かみのある手作業

                            IAM ロールで 100 連鎖してみた | DevelopersIO
                          • PythonとRustの融合:PyO3/maturinを使ったPythonバインディングの作成入門 | gihyo.jp

                            Cargo.tomlにはデフォルトのメタデータとPyO3の依存関係(バージョン)などが記載されています。また、pyproject.tomlにはビルドツールとしてmaturinが使用されることなどがあらかじめ定義されています。 注目すべきはRustスクリプトを記述するsrc/lib.rsファイルです。以下のようなscaffold(足場)が最初から記載されています。 src/lib.rsにデフォルトで記載されているscaffold 1 use pyo3::prelude::*; 2 3 /// Formats the sum of two numbers as string. 4 #[pyfunction] 5 fn sum_as_string(a: usize, b: usize) -> PyResult<String> { 6 Ok((a + b).to_string()) 7 } 8 9

                              PythonとRustの融合:PyO3/maturinを使ったPythonバインディングの作成入門 | gihyo.jp
                            • BigQueryでのデータ追記処理における冪等化の取り組み - ZOZO TECH BLOG

                              こんにちは、MA基盤チームの田島です。私達のチームではMAIL、LINE、PUSH通知といったユーザへの配信をしています。その中でもマス・セグメント配信という一斉に行う配信では、配信対象者のセグメント抽出にBigQueryを利用しています。また、配信前に必要なデータをBigQueryに連携しデータマートの集計をしたり、配信後には配信実績の登録などの更新処理をしています。 そのような処理を定期的に行っているため、ネットワークの問題やサーバーの不調などにより処理が途中で失敗することがあります。そこで、リトライを容易にするため、すべての処理を冪等にしました。今回その中でも、BigQueryの追記処理に絞ってどのように冪等化したのかについて紹介します。 目次 目次 マス・セグメント配信基盤の紹介 課題 冪等化 BigQuery追記処理に関する冪等化の取り組み 冪等にならないケース INSERT 初

                                BigQueryでのデータ追記処理における冪等化の取り組み - ZOZO TECH BLOG
                              • プログラミング言語 Ruby30 周年記念イベント レポート

                                プログラミング言語 Ruby30 周年記念イベント 2023 年 2 月 25 日、Ruby 誕生 30 年を記念したイベントが開催されました。 2020 年から流行した新型コロナウィルス感染症の影響で、一時期のイベントはすべてオンラインでの開催が主流となっていました。 本イベントも当初はオンライン形式で予定されていましたが、当日は松江オープンソースラボをメイン会場としてオフラインとオンラインのハイブリッドで開催されました。 開催日 2023-02-25 (土) 13:40 - 17:30 開催場所 松江オープンソースラボ / YouTube 配信 主催 一般財団法人 Ruby アソシエーション / 一般社団法人 日本 Ruby の会 公式ページ プログラミング言語 Ruby30 周年記念イベント 進行 :前田修吾 公式ハッシュタグ #ruby30th 動画 アーカイブ動画 オープニング

                                • プロと読み解くRuby 3.4 NEWS - STORES Product Blog

                                  プロと読み解くRuby 3.4 NEWS テクノロジー部門技術基盤グループの笹田(ko1)と遠藤(mame)です。Ruby (MRI: Matz Ruby Implementation、いわゆる ruby コマンド) の開発をしています。お金をもらって Ruby を開発しているのでプロの Ruby コミッタです。 本日 12/25 に、恒例のクリスマスリリースとして、Ruby 3.4.0 がリリースされました(Ruby 3.4.0 リリース )。今年も STORES Product Blog にて Ruby 3.4 の NEWS.md ファイルの解説をします(ちなみに、STORES Advent Calendar 2024 の記事になります。他も読んでね)。NEWS ファイルとは何か、は以前の記事を見てください。 プロと読み解く Ruby 2.6 NEWS ファイル - クックパッド開発者

                                    プロと読み解くRuby 3.4 NEWS - STORES Product Blog
                                  • Don't write clean code, write CRISP code — Bitfield Consulting

                                    I’m sure we’re all in favour of “clean code”, but it’s one of those motherhood-and-apple-pie things that no one can reasonably disagree with. Who wants to write dirty code, unless maybe it’s for a porn site? The problem, of course, is that few of us can agree on what “clean code” means, and how to get there. A rule like “methods should only do one thing”, looks great on a T-shirt, but it’s not so

                                      Don't write clean code, write CRISP code — Bitfield Consulting
                                    • 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
                                      • AWS Documentation MCP Server でAWSのFAQアシスタントを作成する - Taste of Tech Topics

                                        はじめに データ分析エンジニアの木介です。 AWSの公式ドキュメントで欲しい情報を探そうとしても、なかなか目的のページが見つからなかったりすることってありませんか? AWSから「AWS Documentation MCP Server」が公開されたため、本記事では、それを利用して、最新のAWSドキュメントに基づき、質問に回答してくれるFAQアシスタントの作成方法について紹介したいと思います。 MCP Serverの呼び出しには、Claude Desktop および dolphin-mcp を利用します。 github.com はじめに 概要 1. MCPとは MCPのしくみ 2. AWS Documentation MCP Serverとは Claude Desktop経由でAWS ドキュメントのFAQアシスタントを作成する dolphin-mcpでAWS ドキュメントのFAQアシスタント

                                          AWS Documentation MCP Server でAWSのFAQアシスタントを作成する - Taste of Tech Topics
                                        • Python×株式投資:従来の100倍!銘柄選抜のバックテストを高速化した話 - Qiita

                                          # ----------------------------- # 2nd Screening V1 # ----------------------------- import time global_start_time = time.time() from google.colab import drive drive.mount('/content/drive') import pandas as pd import numpy as np import os from tqdm.notebook import tqdm import yfinance as yf from curl_cffi import requests # -------------------------------------------------- # ヘルパー関数定義セクション # --------

                                            Python×株式投資:従来の100倍!銘柄選抜のバックテストを高速化した話 - Qiita
                                          • 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

                                            • ULPを活用した電池駆動ESP32雨センサシステムを作る - The Negligible Lab

                                              はじめに 明けましておめでとうございます🐇 とうとう昨年(2022年)の記事がただの1件から増えることがないまま2023年を迎えてしまいました。令和も何ともう5年です。さらにはもう2月ですね。 さて,新型コロナウイルスの流行が始まってから,筆者はほぼ在宅勤務となっています。その仕事机はちょうどバルコニー*1に通じる窓の直近に位置しています。このバルコニーには洗濯物も干しているのですが,雨が降り始めてもすぐ近くに座っている筆者がそれに気付かず,洗濯物を濡らしてしまうことが多々ありました。雨滴を検知して雨の降り始めをお知らせしてくれるシステムがあれば…いや,自分で作るのだ…! そこで,雨が降り始めたらLINEに通知を送ってくれる雨センサシステムを製作します。 まずは図1,2に完成形を示します。 図1: ESP32マイコンによる雨センサシステム 図2: “素”のESP32マイコンを搭載する基板

                                                ULPを活用した電池駆動ESP32雨センサシステムを作る - The Negligible Lab
                                              • Writing a C compiler in 500 lines of Python

                                                A few months ago, I set myself the challenge of writing a C compiler in 500 lines of Python1, after writing my SDF donut post. How hard could it be? The answer was, pretty hard, even when dropping quite a few features. But it was also pretty interesting, and the result is surprisingly functional and not too hard to understand! There's too much code for me to comprehensively cover in a single blog

                                                • How I Use Every Claude Code Feature

                                                  I use Claude Code. A lot. As a hobbyist, I run it in a VM several times a week on side projects, often with --dangerously-skip-permissions to vibe code whatever idea is on my mind. Professionally, part of my team builds the AI-IDE rules and tooling for our engineering team that consumes several billion tokens per month just for codegen. The CLI agent space is getting crowded and between Claude Cod

                                                    How I Use Every Claude Code Feature
                                                  • Moving off of TypeScript

                                                    We Love You, TypeScriptFor nearly five years now, Motion has operated in a large TypeScript monorepo. At its peak, it was roughly ~2.5 million lines of code after excluding comments, node_modules, etc. To manage this, we used Vercel’s rather excellent Turborepo build system. This is not a blog post hating on TypeScript — quite the opposite! Motion would likely not even have survived until today wi

                                                      Moving off of TypeScript
                                                    • ChatGPT Retrieval Pluginに任意のベクトル検索エンジンProviderを実装する - エムスリーテックブログ

                                                      Overview エムスリーエンジニアリンググループ AI・機械学習チームでソフトウェアエンジニアをしている中村(po3rin) です。検索とGoが好きです。 エムスリーではChatGPTの可能性にいち早く注目して活用を検討している段階ですが、本格的なデータ投入にはまだ懸念もあり、セキュリティチームと検討を進めている段階です。 そんな中で個人または組織のドキュメントのセマンティック検索と取得を可能にするChatGPTプラグイン「ChatGPT Retrieval Plugin」が登場しました。 github.com 情報検索好きとしては黙っていられず、外部公開用のエムスリーAI・機械学習チームのメンバー紹介ドキュメントを使ってローカルで試してみました。 # 用意したドキュメント 中村弘武は東京都在住で、エムスリーという企業で働いでいます。 エムスリーの検索基盤を主に担当しています。また、書

                                                        ChatGPT Retrieval Pluginに任意のベクトル検索エンジンProviderを実装する - エムスリーテックブログ
                                                      • LogLog Games

                                                        The article is also available in Chinese. Disclaimer: This post is a very long collection of thoughts and problems I've had over the years, and also addresses some of the arguments I've been repeatedly told. This post expresses my opinion the has been formed over using Rust for gamedev for many thousands of hours over many years, and multiple finished games. This isn't meant to brag or indicate su

                                                        • バグらせやすい書き方をすれば当然バグは出やすい - えびちゃんの日記

                                                          導入 rsk0315.hatenablog.com こういう話はある*1んですが、最初からバグらせやすい書き方をしておいて「バグが出たー」と言われてもそれはそうとなってしまうので、そういうのを控えるくらいのことはするべきだと思います。 書き方が悪いせいで「十分に複雑なコード」になってしまっているものもあります(もちろん概念自体が複雑なものを実装するときは複雑になって当然ですが)。 「控えるべき書き方」とか「書くときに気をつけるべきこと」とかを紹介します。 あくまで自分の主観であって、読み手の人の方針に反するのであれば強制する気はないです。「こういう書き方もあるよー」くらいに捉えてください。 導入 紹介 控えたいこと フラグ変数を乱用しない デバッグは標準エラー出力に書く 出力パートは一箇所にまとめる 計算パートと入出力パートは分ける いくつかの具体例だけで考察を終わらせない 書きながら気を

                                                            バグらせやすい書き方をすれば当然バグは出やすい - えびちゃんの日記
                                                          • Functional programming is finally going mainstream

                                                            Functional programming is finally going mainstream Object-oriented and imperative programming aren’t going away, but functional programming is finding its way into more codebases. Klint Finley // July 12, 2022 Paul Louth had a great development team at Meddbase, the healthcare software company he founded in 2005. But as the company grew, so did their bug count. That’s expected, up to a point. More

                                                              Functional programming is finally going mainstream
                                                            • The Scary Thing About Automating Deploys - Engineering at Slack

                                                              Most of Slack runs on a monolithic service simply called “The Webapp”. It’s big – hundreds of developers create hundreds of changes every week. Deploying at this scale is a unique challenge. When people talk about continuous deployment, they’re often thinking about deploying to systems as soon as changes are ready. They talk about microservices and 2-pizza teams (~8 people). But what does continuo

                                                              • Prototyping in Rust | corrode Rust Consulting

                                                                Programming is an iterative process - as much as we would like to come up with the perfect solution from the start, it rarely works that way. Good programs often start as quick prototypes. The bad ones stay prototypes, but the best ones evolve into production code. Whether you’re writing games, CLI tools, or designing library APIs, prototyping helps tremendously in finding the best approach before

                                                                  Prototyping in Rust | corrode Rust Consulting
                                                                • Claude Skills are awesome, maybe a bigger deal than MCP

                                                                  Claude Skills are awesome, maybe a bigger deal than MCP 16th October 2025 Anthropic this morning introduced Claude Skills, a new pattern for making new abilities available to their models: Claude can now use Skills to improve how it performs specific tasks. Skills are folders that include instructions, scripts, and resources that Claude can load when needed. Claude will only access a skill when it

                                                                    Claude Skills are awesome, maybe a bigger deal than MCP
                                                                  • 📖 vLLMのコードを読んでみよう - ENGINEERING BLOG ドコモ開発者ブログ

                                                                    こんにちは、NTTドコモR&D戦略部の門間です。 この記事では、vLLMのコードを追いつつその中身の動きに迫りたいと思います。 最近、業務やプライベートでLLM関連のいろいろを触っていますが、 OSSのコードリーディングを通じてLLMの推論処理への理解を深めたいというモチベーションです。 🤖 vLLMって? 📚 前提知識 Attention Is All You Need Paged Attention Continuous Batching 📦 vLLMの開発用インストール (Pythonコード開発のみ) Wheelのインストール リポジトリのクローン 起動確認 Pythonコードの改変 デバッガを使ったOSSのコードリーディングのススメ 🧩 vLLMのソフトウェアアーキテクチャ オンライン推論 : FastAPIサーバの立ち上げとEngineClientの生成 1. Engin

                                                                      📖 vLLMのコードを読んでみよう - ENGINEERING BLOG ドコモ開発者ブログ
                                                                    • Python 3.13 gets a JIT

                                                                      Happy New Year everyone! In late December 2023 (Christmas Day to be precise), CPython core developer Brandt Bucher submitted a little pull-request to the Python 3.13 branch adding a JIT compiler. This change, once accepted would be one of the biggest changes to the CPython Interpreter since the Specializing Adaptive Interpreter added in Python 3.11 (which was also from Brandt along with Mark Shann

                                                                        Python 3.13 gets a JIT
                                                                      • Tools: Code Is All You Need

                                                                        If you’ve been following me on Twitter, you know I’m not a big fan of MCP (Model Context Protocol) right now. It’s not that I dislike the idea; I just haven’t found it to work as advertised. In my view, MCP suffers from two major flaws: It isn’t truly composable. Most composition happens through inference. It demands too much context. You must supply significant upfront input, and every tool invoc

                                                                          Tools: Code Is All You Need
                                                                        • 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
                                                                          • Taming Floating-Point Sums | orlp.net

                                                                            Suppose you have an array of floating-point numbers, and wish to sum them. You might naively think you can simply add them, e.g. in Rust: fn naive_sum(arr: &[f32]) -> f32 { let mut out = 0.0; for x in arr { out += *x; } out } This however can easily result in an arbitrarily large accumulated error. Let’s try it out: naive_sum(&vec![1.0; 1_000_000]) = 1000000.0 naive_sum(&vec![1.0; 10_000_000]) = 1

                                                                            • Things we learned about LLMs in 2024

                                                                              31st December 2024 A lot has happened in the world of Large Language Models over the course of 2024. Here’s a review of things we figured out about the field in the past twelve months, plus my attempt at identifying key themes and pivotal moments. This is a sequel to my review of 2023. In this article: The GPT-4 barrier was comprehensively broken Some of those GPT-4 models run on my laptop LLM pri

                                                                                Things we learned about LLMs in 2024
                                                                              • openai/gpt-oss-120b · Hugging Face

                                                                                ","eos_token":"<|return|>","pad_token":"<|endoftext|>"},"chat_template_jinja":"{#-\n In addition to the normal inputs of `messages` and `tools`, this template also accepts the\n following kwargs:\n - \"builtin_tools\": A list, can contain \"browser\" and/or \"python\".\n - \"model_identity\": A string that optionally describes the model identity.\n - \"reasoning_effort\": A string that describes t

                                                                                  openai/gpt-oss-120b · Hugging Face
                                                                                • 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