並び順

ブックマーク数

期間指定

  • から
  • まで

1 - 27 件 / 27件

新着順 人気順

python get row index based on valueの検索結果1 - 27 件 / 27件

  • 関数名、メソッド名、変数名でよく使う英単語のまとめ

    プログラミングをしていると関数名、メソッド名、変数名をどうするか悩みます。 ロジックより命名に時間を費やすこともざらにあります。翻訳したり、一般的な命名規則なのかいつも検索して大変です。 よく使うサイトの内容をコピってメモしておく 関数名とメソッド名の違いについて よく使う英単語のまえに、いつもごっちゃにして使っているけど、定義はこんな感じ 「関数」と「メソッド」の違い 似ているところ どちらも何か(引数)を入れると処理をして何か(戻り値)を返してくれます。 違うところ やってること自体は大差ありません。概念としては違います。 メソッドはオブジェクト指向で登場する用語で、オブジェクトの動作を定義したものです。 まずオブジェクトありきなのですね。一方の関数は、オブジェクト云々は関係ありません。 個人的な使い分け Java で登場する関数は「メソッド」です。C 言語で登場する関数は「関数」と呼

      関数名、メソッド名、変数名でよく使う英単語のまとめ
    • 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

      • Qlibを使った機械学習パイプライン環境の構築 投資の取引戦略最適化と機械学習モデル作成の省力化を目指して - 株のシステムトレードをしよう - 1から始める株自動取引システムの作り方

        概要 はじめに Qlibの試用 動作条件 使用したrequirements.txt データの取得 予測の実施 出力 図示 ソースコード バックテストでのポートフォリオ分析 リスク分析、分析モデル おわりに 概要 本記事では、Qlibを使用して、機械学習パイプライン環境を構築する第一歩について述べる。 はじめに このブログの趣旨としては、当初は「戦略作成」→「戦略検証」→「戦略稼働」→「成果の評価」→「戦略へフィードバック」といったサイクルを管理できるような自動トレーディングシステムを作ることを考えていた。 最近、すこし株取引から離れていたのだが、最近になってまたやり始めようかなと思い、色々と現在の状況を調べはじめた。 その中で、MicrosoftのリポジトリにQlibというものがあるのを見つけた。これが2020年の8月から作られたもので、現在でもメンテされており、もしかするとこれがやりたい

          Qlibを使った機械学習パイプライン環境の構築 投資の取引戦略最適化と機械学習モデル作成の省力化を目指して - 株のシステムトレードをしよう - 1から始める株自動取引システムの作り方
        • 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
          • Implementing Logic Programming

            Most of my readers are probably familiar with procedural programming, object-oriented programming (OOP), and functional programming (FP). The majority of top programming languages on all of the language popularity charts (like TIOBE) support all three to some extent. Even if a programmer avoided one or more of those three paradigms like the plague, they’re likely at least aware of them and what th

              Implementing Logic Programming
            • A 100x speedup with unsafe Python

              We're going to speed up some numpy code by 100x using "unsafe Python." Which is not quite the same as unsafe Rust, but it's a bit similar, and I'm not sure what else to call it... you'll see. It's not something you'd use in most Python code, but it's handy on occasion, and I think it shows "the nature of Python” from an interesting angle. So let's say you use pygame to write a simple game in Pytho

              • RAPIDS Forest Inference Library: Prediction at 100 million rows per second

                IntroductionRandom forests (RF) and gradient-boosted decision trees (GBDTs) have become workhorse models of applied machine learning. XGBoost and LightGBM, popular packages implementing GBDT models, consistently rank among the most commonly used tools by data scientists on the Kaggle platform. We see similar interest in forest-based models in industry, where they are applied to problems ranging fr

                  RAPIDS Forest Inference Library: Prediction at 100 million rows per second
                • はじめての自然言語処理 DeepSpeed-Chat による RLHF の紹介 | オブジェクトの広場

                  今回は DeepSpeed-Chat による RLHF のご紹介です。正直、データセットや計算資源の都合もあり、とりあえず動かしてみました!的な話にはなりますが、RLHF の効果が実際に確認できるか見てみたいと思います。 1. はじめに 今回は DeepSpeed-Chat1 を使って RLHF を試してみたいと思います。RLHF は Reinforcement Learning from Human Feedback の略で文字通り「人からのフィードバックを用いた強化学習」ということですね。OpenAI が InstructGPT(ChatGPT の元になったモデル)2 で使ったことで注目された手法になります。 LLM がらみで何か記事にしたいと思いつつ、日々新たな LLM が発表されている昨今に、隔月&内容が実時間から月単位で遅れ気味wの本連載です。 「どうしたもんかな。。。」と悩みに

                    はじめての自然言語処理 DeepSpeed-Chat による RLHF の紹介 | オブジェクトの広場
                  • 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

                    • xvw.lol - Why I chose OCaml as my primary language

                      This article is a translation, the original version is available here. I started using the OCaml language regularly around 2012, and since then, my interest and enthusiasm for this language have only grown. It has become my preferred choice for almost all my personal projects, and it has also influenced my professional choices. Since 2014, I have been actively participating in public conferences d

                      • A 2025 Survey of Rust GUI Libraries

                        I did this in 2020 and then again in 2021, but I’m in the mood to look around again. Let’s look through Are We GUI Yet? and see what’s up these days. The task today is to have a text label and an input field that can change the text in the label. In React, for example, this is basically free: const Demo = () => { let [state, setState] = useState("Hello, world!"); return ( <div> <p>{state}</p> <inp

                        • Database Fundamentals

                          About a year ago, I tried thinking which database I should choose for my next project, and came to the realization that I don't really know the differences of databases enough. I went to different database websites and saw mostly marketing and words I don't understand. This is when I decided to read the excellent books Database Internals by Alex Petrov and Designing Data-Intensive Applications by

                            Database Fundamentals
                          • Mastering Customer Segmentation with LLM | Towards Data Science

                            Unlock advanced customer segmentation techniques using LLMs, and improve your clustering models with advanced techniques Content Table · Intro · Data · Method 1: Kmeans · Method 2: K-Prototype · Method 3: LLM + Kmeans · Conclusion Intro A customer segmentation project can be approached in multiple ways. In this article I will teach you advanced techniques, not only to define the clusters, but to a

                              Mastering Customer Segmentation with LLM | Towards Data Science
                            • Plan 9 Desktop Guide

                              PLAN 9 DESKTOP GUIDE INDEX What is Plan 9? Limitations and Workarounds Connecting to Other Systems VNC RDP SSH 9P Other methods Porting Applications Emulating other Operating Systems Virtualizing other Operating Systems Basics Window Management Copy Pasting Essential Programs Manipulating Text in the Terminal Acme - The Do It All Application Multiple Workspaces Tiling Windows Plumbing System Admin

                              • How the RWKV language model works

                                In this post, I will explain the details of how RWKV generates text. For a high level overview of what RWKV is and what is so special about it, check out the other post about RWKV. To explain exactly how RWKV works, I think it is easiest to look at a simple implementation of it. The following ~100 line code (based on RWKV in 150 lines) is a minimal implementation of a relatively small (430m parame

                                • 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)
                                  • 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
                                    • PipeWire - ArchWiki

                                      PipeWire は新しい低レベルマルチメディアフレームワークです。 映像と音声を最小の遅延で再生/キャプチャすることを目的としていて、PulseAudio、JACK、ALSA、GStreamer をベースとしたアプリケーションと互換性があります。 このフレームワークのデーモンは (PulseAudio と JACK の機能を持った) オーディオサーバーとしても、ビデオキャプチャサーバーとしても設定できます。 また PipeWire は Flatpak のようなコンテナをサポートしており、audio や video ユーザーグループに依存するのではなく、Flatpak や Wayland にスクリーンや音声を録音する許可を求める Polkit のようなセキュリティモデルを使用しています。 インストール 公式リポジトリから pipewire パッケージを インストール してください。mult

                                      • pandas: An Ultimate Python Library for Data Science

                                        In this article, I will introduce the pandas library of Python programming language for data science. We will also see practical examples of code to create data frames, logical operations, and looping, apart from examples of code for the advanced concepts of pandas. Introduction to pandaspandas is a great library of Python for data science for most industry applications with massive amounts of dif

                                          pandas: An Ultimate Python Library for Data Science
                                        • Reindex, Transform, and Aggregate datasets using pandas Library

                                          Most of the time, the dataset we will get from the business will be dirty and cannot be used straight forward to train machine learning models. Therefore, we must treat the dataset and bring it to the desired form to input it into an algorithm. This tutorial discusses reindexing, transforming, and aggregating datasets in Pandas. What are Reindexing, Transforming, and Aggregating?Reindexing, transf

                                            Reindex, Transform, and Aggregate datasets using pandas Library
                                          • JupyterLab Changelog — JupyterLab 4.5.0a3 documentation

                                            JupyterLab Changelog# v4.4# JupyterLab 4.4 includes a number of new features (described below), bug fixes, and enhancements. This release is compatible with extensions supporting JupyterLab 4.0. Extension authors are encouraged to consult the Extension Migration Guide which lists deprecations and changes to the public API. Code console improvements# The code console prompt can now be positioned on

                                            • From Oscilloscope to Wireshark - A UDP Story

                                              Physical Like many of you, I've got hardware on my desk that's sending UDP packets, and the time has come to take a closer look at them. Most "low-level" networking tutorials will bottom out somewhere at "use tcpdump to see raw packets". We'll be starting a bit lower in the stack; specifically, here: This is a high-speed active differential probe soldered to an Oxide Computer Company rack switch.

                                              • October 2023 (version 1.84)

                                                Update 1.84.1: The update addresses these issues. Update 1.84.2: The update addresses these issues. Downloads: Windows: x64 Arm64 | Mac: Universal Intel silicon | Linux: deb rpm tarball Arm snap Welcome to the October 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: More audio cues - New audio cues to indicate

                                                  October 2023 (version 1.84)
                                                • Building the Same App Using Various Web Frameworks

                                                  Building the Same App Using Various Web Frameworks [ learning engineering python 🛠 ] · 8 min read Recently, I’ve been wondering if I should migrate from my current web app stack (FastAPI, HTML, CSS, and a sprinkle of JavaScript) to a modern web framework. I was particularly interested in FastHTML, Next.js, and Svelte. FastHTML: Many folks have started building with it since Jeremy Howard launched

                                                    Building the Same App Using Various Web Frameworks
                                                  • PgBouncer is useful, important, and fraught with peril

                                                    Updated 2024-09-17 to reflect updated PgBouncer support for protocol-level prepared statements 🐘 To start, I want to say that I’m appreciative that PgBouncer exists and the work its open source maintainers put into it. I also love working with PostgreSQL, and I’m thankful for the incredible amount of work and improvements that go into it as well. I also think community and industry enthusiasm aro

                                                      PgBouncer is useful, important, and fraught with peril
                                                    • Timsort — the fastest sorting algorithm you’ve never heard of

                                                      Timsort — the fastest sorting algorithm you’ve never heard of Photo by Andrew Meehan / Unsplash Timsort: A very fast , O(n log n), stable sorting algorithm built for the real world — not constructed in academia. Image from here.Timsort is a sorting algorithm that is efficient for real-world data and not created in an academic laboratory. Tim Peters created Timsort for the Python programming langua

                                                        Timsort — the fastest sorting algorithm you’ve never heard of
                                                      • GitHub - ComfyUI-Workflow/awesome-comfyui: A collection of awesome custom nodes for ComfyUI

                                                        ComfyUI-Gemini_Flash_2.0_Exp (⭐+172): A ComfyUI custom node that integrates Google's Gemini Flash 2.0 Experimental model, enabling multimodal analysis of text, images, video frames, and audio directly within ComfyUI workflows. ComfyUI-ACE_Plus (⭐+115): Custom nodes for various visual generation and editing tasks using ACE_Plus FFT Model. ComfyUI-Manager (⭐+113): ComfyUI-Manager itself is also a cu

                                                          GitHub - ComfyUI-Workflow/awesome-comfyui: A collection of awesome custom nodes for ComfyUI
                                                        1