並び順

ブックマーク数

期間指定

  • から
  • まで

1 - 39 件 / 39件

新着順 人気順

reversed python listの検索結果1 - 39 件 / 39件

  • Claude Code中心のMac開発環境を整備する - tmux・Ghostty・Discord通知

    Stopイベントには追加で stop_hook_active(無限ループ防止用フラグ)が、Notificationイベントには notification_type と message が含まれます。 settings.jsonの設定 { "env": { "CLAUDE_DISCORD_WEBHOOK_URL": "https://discord.com/api/webhooks/..." }, "hooks": { "Stop": [ { "hooks": [ { "type": "command", "command": "python3 $HOME/.claude/hooks/discord-notify.py", "async": true } ] } ], "Notification": [ { "matcher": "", "hooks": [ { "type": "comma

      Claude Code中心のMac開発環境を整備する - tmux・Ghostty・Discord通知
    • 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

      • microgpt

        microgpt.py P%]� �tP� """ The most atomic way to train and run inference for a GPT in pure, dependency-free Python. This file is the complete algorithm. Everything else is just efficiency. @karpathy """ import os # os.path.exists import math # math.log, math.exp import random # random.seed, random.choices, random.gauss, random.shuffle random.seed(42) # Let there be order among chaos # Let there be

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

            This is a brief guide to my new art project microgpt, a single file of 200 lines of pure Python with no dependencies that trains and inferences a GPT. This file contains the full algorithmic content of what is needed: dataset of documents, tokenizer, autograd engine, a GPT-2-like neural network architecture, the Adam optimizer, training loop, and inference loop. Everything else is just efficiency.

            • Azure OpenAI Service の Assistants API でデータ分析 - Taste of Tech Topics

              こんにちは、igaです。 最近は気温の上下が大きいので、服装選びが大変ですね。 今回は、Azure OpenAI Servce Assistants APIを使ってみました。 Azure OpenAI Servce Assistants APIに横浜市の人口データを投入して、人口の増減がどう推移しているのか自動で分析させてみました。 Azure OpenAI Servce Assistants API Azure OpenAI Servce Assistants APIとは Azure OpenAI Servce Assistants APIは、2024年4月現在パブリックプレビューとして利用できる機能です。 learn.microsoft.com Azure OpenAI Servce Assistants API(以降、Assistantsと表記します)により、Azure OpenAI

                Azure OpenAI Service の Assistants API でデータ分析 - Taste of Tech Topics
              • 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

                • Rust: A Critical Retrospective « bunnie's blog

                  Since I was unable to travel for a couple of years during the pandemic, I decided to take my new-found time and really lean into Rust. After writing over 100k lines of Rust code, I think I am starting to get a feel for the language and like every cranky engineer I have developed opinions and because this is the Internet I’m going to share them. The reason I learned Rust was to flesh out parts of t

                  • Kindle for PCのスクショを撮る - Qiita

                    新しいバージョンがあります Kindle for PCを画像にしたい Kindle for PCのUIは正直クソなので、画像にして保存したいです。 幸いなことにスクリーンショットは撮れるので、Pythonを使えば楽に画像に出来るでしょう。 と、言うわけでweb検索した その結果、pyautoguiを使って連続してスクショを撮っているPythonスクリプトがありました。でも、正直あまり気に入らなかったのです。 と、言うのも、実行したら5秒以内にKindle for PCを表に持ってきて、フルスクリーンにして、で、5秒ごとにページを進めてスクショを撮って保存する。と言うものでした。 しかも切り取る座標は自分で入力しなければいけませんでした。 もっと楽に、高速化出来るはず Windows限定になってしまいますが、ウィンドウ一覧から特定のウィンドウをアクティブにするのは出来るはずです、もちろん、フ

                      Kindle for PCのスクショを撮る - Qiita
                    • My thoughts on writing a Minecraft server from scratch (in Bash)

                      My thoughts on writing a Minecraft server from scratch (in Bash) For the past year or so, I've been thinking about writing a Minecraft server in Bash as a thought excercise. I once tried that before with the Classic protocol (the one from 2009), but I quickly realized there wasn't really a way to properly parse binary data in bash. Take the following code sample: function a() { read -n 2 uwu echo

                      • Eliciting Reasoning in Language Models with Cognitive Tools

                        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 about the mechanisms underlying these

                        • Dynamic Programming is not Black Magic - Quentin Santos

                          This year’s Advent of Code has been brutal (compare the stats of 2023 with that of 2022, especially day 1 part 1 vs. day 1 part 2). It included a problem to solve with dynamic programming as soon as day 12, which discouraged some people I know. This specific problem was particularly gnarly for Advent of Code, with multiple special cases to take into account, making it basically intractable if you

                            Dynamic Programming is not Black Magic - Quentin Santos
                          • Ordering Movie Credits With Graph Theory

                            At Endcrawl we're always thinking about the hard work that goes into making film and TV, and how that work translates to on-screen credits. A feature film may involve thousands of people, hundreds of distinct job titles or "roles," and dozens of departments. So there's plenty for a producer to worry about, like: Did we forget or misspell a name? Is this the correct way to credit that role? Do all

                              Ordering Movie Credits With Graph Theory
                            • Boris Cherny (Creator of Claude Code) On How His Career Grew

                              Boris Cherny is the Creator of Claude Code but few people know his full career story. I interviewed him about everything he learned growing at Meta and for insights from his time building Claude Code at Anthropic. Check out the episode wherever you get your podcasts: YouTube, Spotify, Apple Podcasts. Ryan: [00:00:59] I wanted to start at the beginning of your story with you getting promoted to sen

                                Boris Cherny (Creator of Claude Code) On How His Career Grew
                              • いろんなソートアルゴリズムを実装してみよう - Qiita

                                最近昼夜逆転がひどい六角レンチです 夕方まで起きてようと思ったらいつの間にか寝て夜に起きる謎 haskellに興味を持って入門の記事を見ながらソートを実装して楽しんでます。 ガードとかパターンマッチ楽しい 他にはどんなソートがあるんだろうと思いwikipediaを見ていろいろなソートアルゴリズムを発見したので、pythonの練習として実装してみたいと思います。 実装してみたソートたちはここに置いてます。 バブルソート def bubblesort(target:list): # バブルソート for targetrange in reversed(range(1, len(target))): isnotswap = True for r in range(targetrange-1): if target[r] > target[r+1]: target[r], target[r+1]

                                  いろんなソートアルゴリズムを実装してみよう - Qiita
                                • Renato Athaydes

                                  Revenge of Lisp (Part 1⁄2) Background vector created by upklyak - www.freepik.com This may surprise you if you know me, but I’ve been learning Common Lisp for a few weeks now. It all started when I was reading, funnily enough, a blog post about another, much more hyped, language called Julia. The post was titled Julia and the reincarnation of Lisp, and in it the author lamented that despite his lo

                                  • t検定におけるサンプルサイズが与える影響の考察 - ZOZO TECH BLOG

                                    はじめまして、ZOZO研究所 福岡の家富です。画像検索システムのインフラ、機械学習まわりを担当しています。 今回は、t検定におけるサンプルサイズが与える影響を解説します。 目次 目次 t検定の使われ方 t検定 t検定の問題点 論文手法 実際の購入金額データに対する考察 まとめ さいごに t検定の使われ方 近年、施策が有効かどうかをデータを元に統計的に判断していこう、という話を聞くことが増えてきました。 経済学の流行においても、統計的な指標を重要視する流れが強まってきています。例えば、貧困対策にお金をどの程度どのような用途で支給するのが良いか、といった議論で利用されることも多くなってきています。 www.amazon.co.jp Web業界においても、サイトの変更や施策の有効性をA/Bテストなどを実施し、統計的に判断していく流れが主流になってきています。なお、本記事では以下の文献を「A/Bテ

                                      t検定におけるサンプルサイズが与える影響の考察 - ZOZO TECH BLOG
                                    • GA4のテーブルをBigQueryからPostgreSQLにAvroファイル経由でコピーする - Qiita

                                      設定ファイルはPythonコードを動かすディレクトリに置きます。 設定ファイルの[BigQuery]セクションに、GA4のテーブルが入っているGoogle Cloudのプロジェクト名とデータセット名を記述します。 [GCS]セクションに、Avroファイルを格納するCloud Storageのバケット名を記述します。 コード説明 上記のPythonコードで行うことは以下の通りです。 BigQueryのGA4テーブルをAvro形式でexportします まずBigQueryからCloud Storageにexportし、次にCloud Storageからローカルにダウンロードします。 記事執筆時点で、BigQueryからローカルに直接exportできないため、Cloud Storageを経由しています。 テーブル名が「events_」から始まるテーブルをGA4のテーブルとみなし、まとめてexpo

                                        GA4のテーブルをBigQueryからPostgreSQLにAvroファイル経由でコピーする - Qiita
                                      • The Alkyne GC · mcyoung

                                        Alkyne is a scripting language I built a couple of years ago for generating configuration blobs. Its interpreter is a naive AST walker1 that uses ARC2 for memory management, so it’s pretty slow, and I’ve been gradually writing a new evaluation engine for it. This post isn’t about Alkyne itself, that’s for another day. For now, I’d like to write down some notes for the GC I wrote3 for it, and more

                                          The Alkyne GC · mcyoung
                                        • 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,

                                          • Ubuntu 24.04 LTS (Noble Numbat) Release Notes

                                            Noble Numbat Release Notes Table of Contents Introduction New features in 24.04 LTS Known Issues Official flavours More information Introduction These release notes for Ubuntu 24.04 LTS (Noble Numbat) provide an overview of the release and document the known issues with Ubuntu and its flavours. For details of the changes applied since 24.04, please see the 24.04.2 change summary. Support lifespan

                                            • Notcurses

                                              When Bison graced her village, it was Tuesday notcurses is a library for building complex, vibrant textual user interfaces (TUIs) on modern terminal emulators. It does not use Ncurses (though it does make use of libtinfo from that package), nor is it an X/Open Curses source-compatible replacement. It is written in C, with C++-safe headers. Rust, C++, and Python wrappers are available. Source and i

                                                Notcurses
                                              • A from-scratch tour of Bitcoin in Python

                                                I find blockchain fascinating because it extends open source software development to open source + state. This seems to be a genuine/exciting innovation in computing paradigms; We don’t just get to share code, we get to share a running computer, and anyone anywhere can use it in an open and permissionless manner. The seeds of this revolution arguably began with Bitcoin, so I became curious to dril

                                                • When Open Becomes Opaque: The Changing Face of Open-Source Hardware Companies

                                                  July 12, 2023 AT 1:00 pm When Open Becomes Opaque: The Changing Face of Open-Source Hardware Companies Over the last 15+ years, innovative electronics companies have designed and released thousands of open-source hardware designs, creating a flourishing industry. Open-source hardware companies collectively created, and signed the open-source hardware definition which means products meet a uniform

                                                    When Open Becomes Opaque: The Changing Face of Open-Source Hardware Companies
                                                  • std::flip

                                                    std::flip is a little-known utility from the C++ standard library header <functional>: it is a higher-order function that accepts a Callable and returns an equivalent Callable with the order of its parameters reversed (or “flipped”). To understand how it can be useful, let’s start with a simple example. Consider the following tree node class: struct node { int value; node* parent = nullptr; node*

                                                    • 「解いて学ぶ」Python入門 - Qiita

                                                      はじめに 何となくわかった気になったけれど、実はわかってない、ということがよくあります。そこで、「解いて学ぶ」シリーズでは、問題を解いて学ぶことで物事を深く理解していきます。今回は、Pythonです。 ※協力:chatGPT(Model 4) 1. 問題編 Pythonでリストの要素を取り出す際、以下の選択肢のうちどれが正しいですか? A. list.get(1) B. list[1] C. list.1 D. list(1) Pythonで整数を文字列に変換する際、以下の選択肢のうちどれが正しいですか? A. str(int) B. int(str) C. string(int) D. int(string) Pythonでリストを逆順にする際、以下の選択肢のうちどれが正しいですか? A. list.reversed() B. list.reverse() C. reversed(lis

                                                        「解いて学ぶ」Python入門 - Qiita
                                                      • イテレータと仲良くなろう | フューチャー技術ブログ

                                                        SAIG の佐藤尭彰です。最近は業務で Python ばっかり書いています。 今回は Python連載 の第4回目で、Python の中でも「なんとなく」で扱われがちなイテレータについてです。 イテレータとはあるコンテナの中の要素に1つずつアクセスできるオブジェクト。 もう少し 公式 から引用すると、 (iter()) 関数は、コンテナの中の要素に1つずつアクセスする __next__() メソッドが定義されているイテレータオブジェクトを返します。 つまり、コンテナの中身を1つずつ返す __next__() メソッドを持つ (ようなオブジェクトを返す __iter__() 関数を持つ) ことがイテレータの本質です。 list などのシーケンスと異なり、実態として中身が存在する必要がありません。これを実装するための1手段が ジェネレータ や ジェネレータ式 であり、返すべき値はこれらを呼び出

                                                          イテレータと仲良くなろう | フューチャー技術ブログ
                                                        • A History of the Future, 2025-2040 — LessWrong

                                                          This is an all-in-one crosspost of a scenario I originally published in three parts on my blog, No Set Gauge. Links to the originals: A History of the Future, 2025-2027A History of the Future, 2027-2030A History of the Future, 2030-2040 Thanks to Luke Drago, Duncan McClements, Theo Horsley, and Bilal Chughtai for comments. 2025-2027Below is part 1 of an extended scenario describing how the future

                                                            A History of the Future, 2025-2040 — LessWrong
                                                          • Primitive Recursive Functions For A Working Programmer

                                                            Primitive Recursive Functions For A Working Programmer Aug 1, 2024 Programmers on the internet often use “Turing-completeness” terminology. Typically, not being Turing-complete is extolled as a virtue or even a requirement in specific domains. I claim that most such discussions are misinformed — that not being Turing complete doesn’t actually mean what folks want it to mean, and is instead a stand

                                                            • D-Bus overview - Fedora Magazine

                                                              What D-Bus is D-Bus serves various purposes aiming to facilitate the cooperation between different processes in the system. This article will describe D-Bus and how it performs this function. From the D-Bus creators definition: D-Bus is a message bus system, a simple way for applications to talk to one another. In addition to interprocess communication, D-Bus helps coordinate process lifecycle; it

                                                                D-Bus overview - Fedora Magazine
                                                              • AtCoder - 解法パターンの整理 - 競プロはじめました

                                                                よく出る思考パターン・覚えておきたいアイディアをメモしておきます. 問題の分類にもなっています.参考になるコードのリンクをメモしている問題もあります. 【2022.01追記】最近は,このページではなく,タグで分類するようにしています. 入力 出力 改行して出力 bool False, True 比較演算子 all, any 切り捨て・切り上げ(床関数・天井関数) 四捨五入 ソート 反転(逆順) スライス 後ろから指定 文字列操作 置換 リストの結合 deque - 先頭・末尾への追加・削除 アルファベット⇔数字 文字列の位置(左端,右端) 正規表現 リスト操作 注意 2要素の入れ替え set 生成 集合演算 setの中にlistはダメ! 組み合わせ 出現回数 - collections.Counter 同じ値になる組み合わせ 二項係数 二項係数(mod 10**9+7) mod mod 1

                                                                  AtCoder - 解法パターンの整理 - 競プロはじめました
                                                                • Catching the big fish: Analyzing a large-scale phishing-as-a-service operation | Microsoft Security Blog

                                                                  In researching phishing attacks, we came across a campaign that used a rather high volume of newly created and unique subdomains—over 300,000 in a single run. This investigation led us down a rabbit hole as we unearthed one of the operations that enabled the campaign: a large-scale phishing-as-a-service operation called BulletProofLink, which sells phishing kits, email templates, hosting, and auto

                                                                    Catching the big fish: Analyzing a large-scale phishing-as-a-service operation | Microsoft Security Blog
                                                                  • JangaFX - Insight: Linux Binary Compatibility

                                                                    The Atrocious State Of Binary Compatibility on Linux and How To Address It. By Dale Weiler GitHub Time To Read: ~30 Minutes Last Updated: Monday, March 17th 2025 Summary Linux binary compatibility is plagued by one thing that is often overlooked when evaluating shipping software on Linux. This article will deconstruct how to arrive to that conclusion, how to address it when shipping software today

                                                                      JangaFX - Insight: Linux Binary Compatibility
                                                                    • Representation Engineering Mistral-7B an Acid Trip

                                                                      In October 2023, a group of authors from the Center for AI Safety, among others, published Representation Engineering: A Top-Down Approach to AI Transparency. That paper looks at a few methods of doing what they call "Representation Engineering": calculating a "control vector" that can be read from or added to model activations during inference to interpret or control the model's behavior, without

                                                                      • Flatpak Is Not the Future

                                                                        ← ludocode.com Flatpak Is Not the Future Original date: 2021-11-18 Last updated: 2021-11-23 Deploying apps for the Linux desktop is hard. A major problem has historically been library compatibility. Different Linux distributions, and even different versions of the same distribution, have had incompatible libraries. Unfortunately, there hasn’t always been a culture of backwards compatibility on the

                                                                        • What's new at Google I/O 2023

                                                                          Introducing the Extensions publishing experience If you’re a developer with an idea for a new extension - or if you want to help people get started with your business’ API - you can now use the Extensions publishing experience to build, publish, and share your own extensions with millions of Firebase and Google Cloud developers across the world. This is the first step towards building a thriving e

                                                                            What's new at Google I/O 2023
                                                                          • 【R&D DevOps通信】AWS Step Functions で失敗したステップから再開する方法 - Sansan Tech Blog

                                                                            こんにちは、R&D Architectグループの藤岡です。今回は Step Functions(以下SFn) が実行途中で失敗した場合に、失敗した時点から再開できるような仕組みを実現したので、その内容について共有します。 <2024/2/8追記> AWS公式で Step Functions の失敗した時点から再開する機能がサポートされたので、この記事の内容は古くなりました。 https://aws.amazon.com/jp/about-aws/whats-new/2023/11/aws-step-functions-restarting-workflows-failure/ 背景と課題 今回、R&D内で稼働しているバッチの1つに関してシステムのリプレイスを行うことになりました。リプレイスを行う理由は主に以下の2つです。 バッチが途中で失敗した際の復旧作業が複雑になっていた。 バッチで処理

                                                                              【R&D DevOps通信】AWS Step Functions で失敗したステップから再開する方法 - Sansan Tech Blog
                                                                            • Lambda関数でTensorFlow Liteをインポートし、推論処理を実行する | DevelopersIO

                                                                              はじめに 現在、カフェのシステムでは、機械学習を用いて、カメラを用いて動画を撮影し、商品の前にいる人物の骨格や手を検出することで、どのユーザがどの商品を取り出したかを判定しています。 今までは、骨格検出モデルを用いてエッジデバイスで動画を推論処理(撮影した画像から映っている人物の骨格の座標を検出する処理)を実行する、という構成で処理をしていました。今後、エッジ側のデバイスの費用を下げたり、骨格検出以外の処理を増やすことを考えているため、エッジデバイスからクラウドに動画を送信し、クラウド側で様々な処理を実行する、という構成を検討しています。 前回までの記事で、エッジデバイスでの動画処理(エンコード・送信)と、クラウド側の処理(動画の取り出し)について記載しました。 撮影した動画をリアルタイムにエンコードする方法【GStreamer】 【Kinesis Video Streams】Python

                                                                                Lambda関数でTensorFlow Liteをインポートし、推論処理を実行する | DevelopersIO
                                                                              • ABC283で入茶しました!〜成長日記〜 - 成長観察日記

                                                                                華麗なる右アッパー(©︎Ruteさん)で、ついに照り焼き色になりました〜!!! すごい、どこもかしこも茶色でうれしい!! うれしいので、わたしのAtCoder歴を辿る、成長観察日記をお届けすることにしました。 ひとりじゃ絶対無理だったーので、お礼も込めて、アカウント名を出したりしてしまってます…もしよろしくなかったら消すので、教えてください! というわけで、お見苦しいところもある日記ですが、どうぞ行けるところまでお付き合いください 第一部 2021年 11月 伝来 12月 12/11(土) はじめてのAC、そしてはじめてのWA 12/15(水)〜12月末 2022年 1月 01/02(日)〜01/04(火) 01/08(土) はじめてのコンテスト はじめての0完 01/30(土) 2回目のコンテスト はじめてのコンテスト中AC 2月 02/05(土) 3回目のABC はじめてのTLE 再び

                                                                                  ABC283で入茶しました!〜成長日記〜 - 成長観察日記
                                                                                1