並び順

ブックマーク数

期間指定

  • から
  • まで

1 - 40 件 / 50件

新着順 人気順

python use zip in for loopの検索結果1 - 40 件 / 50件

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

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

      防衛省サイバーコンテスト 2025 writeup - st98 の日記帳 - コピー
    • 遅くないpandasの書き方 - ML_BearのKaggleな日常

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

        遅くないpandasの書き方 - ML_BearのKaggleな日常
      • 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

        • A search engine in 80 lines of Python

          February 05, 2024 · 9 mins · 1675 words Share on: X · HN Discussion on HackerNews. Last September I hopped on board with Wallapop as a Search Data Scientist and since then part of my work has been working with Solr, an open-source search engine based on Lucene. I’ve got the basics of how a search engine works, but I had this itch to understand it even better. So, I rolled up my sleeves and decided

          • WSL2でunslothのGPROトレーニングを試してみる|noguchi-shoji

            「DeepSeek-R1 の推論を自分のローカル デバイスで再現できるように」「わずか7GBのVRAMでアハ体験を」とのことなので、UnslothのGRPO(Group Relative Policy Optimizatin)トレーニングを試してみます。 今回は Phi-4 (14B)で試してみます。 You can now reproduce DeepSeek-R1's reasoning on your own local device! Experience the "Aha" moment with just 7GB VRAM. Unsloth reduces GRPO training memory use by 80%. 15GB VRAM can transform Llama-3.1 (8B) & Phi-4 (14B) into reasoning models. Blo

              WSL2でunslothのGPROトレーニングを試してみる|noguchi-shoji
            • 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
              • Node.js

                Notable Changes Deprecations and Removals (SEMVER-MAJOR) fs: remove permissive rmdir recursive (Antoine du Hamel) #37216 (SEMVER-MAJOR) fs: runtime deprecate rmdir recursive option (Antoine du Hamel) #37302 (SEMVER-MAJOR) lib: runtime deprecate access to process.binding('http_parser') (James M Snell) #37813 (SEMVER-MAJOR) lib: runtime deprecate access to process.binding('url') (James M Snell) #377

                  Node.js
                • python_modules.pdf

                  Python3 OpenCV / Pillow / pygame / Eel / PyDub / NumPy / matplotlib / SciPy / SymPy / gmpy2 / hashlib, passlib / Cython / Numba / ctypes / PyInstaller / curses / tqdm / JupyterLab / json / psutil / urllib / zenhan / jaconv Copyright © 2017-2025, Katsunori Nakamura 2025 8 19 Python ‘ .py’ Python Python Windows PSF Python py .py Enter macOS Linux PSF Python python3 .py Enter Anaconda Prompt Python p

                  • What's new in Python 3.11?

                    What's new in Python 3.11?Built-in TOML support, better exceptions, and typing improvements. By Tushar·InsightsPython The first beta release of Python 3.11 is out, bringing some fascinating features for us to tinker with. This is what you can expect to see in 2022's release of Python later this year. Even better error messagesPython 3.10 gave us better error messages in various regards, but Python

                      What's new in Python 3.11?
                    • Bringing the power of AI to Windows 11 – unlocking a new era of productivity for customers and developers with Windows Copilot and Dev Home

                      Bringing the power of AI to Windows 11 – unlocking a new era of productivity for customers and developers with Windows Copilot and Dev Home The team and I are pumped to be back at Build with the developer community this year. Over the last year, Windows has continued to see incredible growth fueled by Windows 11 adoption. In fact, one of the most exciting areas driving that growth for Windows has

                        Bringing the power of AI to Windows 11 – unlocking a new era of productivity for customers and developers with Windows Copilot and Dev Home
                      • 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

                        • Manus tools and prompts

                          agent loop �� �p�� You are Manus, an AI agent created by the Manus team. You excel at the following tasks: 1. Information gathering, fact-checking, and documentation 2. Data processing, analysis, and visualization 3. Writing multi-chapter articles and in-depth research reports 4. Creating websites, applications, and tools 5. Using programming to solve various problems beyond development 6. Variou

                            Manus tools and prompts
                          • OBS Studio に関するメモ - すたいるのOBS情報メモブログ

                            OBS Studioに関する情報メモを書いてる記事 ※「OBS Studioに関する個人的メモ」を移転しました。(現在は閲覧不可) 記事投稿日 2021年10月6日 本記事は文字数が非常に多いため、ブラウザの検索機能をご活用ください。 ブラウザ検索のショートカットキー ・Windows : Ctrl + F ・macOS : Command + F 見づらくて申し訳ありません。 将来的には内容を分割して投稿したいと考えていますが、分けても長くなってしまうため、当面はこのページにまとめています。 この記事は以下の環境を使用して作成しています。 ※Linux、特定のデバイスが無いと表示されないソースのことはメモしていません。 ■Windowsの場合 OBS Studio 31.1.2 (それ以前のバージョン、および開発版も含む) OS : Windows 11 Pro 64bit (バージョン

                              OBS Studio に関するメモ - すたいるのOBS情報メモブログ
                            • o1 pro + AIエンジニアにチャットで指示しながら、研究的なことをさせてみる |Kan Hatakeyama

                              はじめに自律的にプログラミングをしてくれるAIエンジニアをいい感じに動かせるようになってきたので、今日はChatGPT + devinで研究的なことをさせてみます。 自動研究といえば、昨年の夏に話題になった、Sakana AIのAIサイエンティストが有名です。 ただ、研究のネタを考えるのはまだあまり得意でない気がしたので、今回は適宜、そこはスマホで指示を出しながら、human in the loopで進めていきます。 最初のセットアップを除いて、チャットをするだけで、基本的な研究作業をこなせそう感じでした。 下準備: リポジトリを作ってdevinに登録するはじめに、パソコンを使って設定をします。このセクションの作業以降は、スマホがあればOKです。 githubでレポジトリを作り、一つだけ、開発方針に関するファイルを作っておきます。 DevelopmentPolycy.md 開発、コメントな

                                o1 pro + AIエンジニアにチャットで指示しながら、研究的なことをさせてみる |Kan Hatakeyama
                              • Node.js — Node.js v22.7.0 (Current)

                                2024-08-22, Version 22.7.0 (Current), @RafaelGSS Experimental transform types support With the new flag --experimental-transform-types it is possible to enable the transformation of TypeScript-only syntax into JavaScript code. This feature allows Node.js to support TypeScript syntax such as Enum and namespace. Thanks to Marco Ippolito for making this work on #54283. Module syntax detection is now

                                  Node.js — Node.js v22.7.0 (Current)
                                • Infinite Mac: An Instant-Booting Quadra in Your Browser

                                  tl;dr I’ve extended James Friend’s in-browser Basilisk II port to create a full-featured classic 68K Mac in your browser. You can see it in action at system7.app or macos8.app. For a taste, see also this screencast: Backstory It’s a golden age of emulation. Between increasing CPU power, WebAssembly, and retrocomputing being so popular The New York Times is covering it, it’s never been easier to re

                                    Infinite Mac: An Instant-Booting Quadra in Your Browser
                                  • Rust and Cosmopolitan Libc | Blog Needs a Name

                                    Rust and Cosmopolitan Libc2023-11-01 Update: I found out that Rust decides system constants like EINVAL and SIGTERM at compile-time, which means that the portability of Rust executables is limited to x86_64-linux and aarch64-linux, the targets with which the executables are built. It’s good to know that Cosmo can be a viable target for Rust, and perhaps later we may use extern system constants in

                                    • 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

                                      • Faster virtual machines: Speeding up programming language execution - Mort's Ramblings

                                        Date: 2023-01-15 Git: https://gitlab.com/mort96/blog/blob/published/content/00000-home/00015-fast-interpreters.md In this post, I hope to explore how interpreters are often implemented, what a "virtual machine" means in this context, and how to make them faster. Note: This post will contain a lot of C source code. Most of it is fairly simple C which should be easy to follow, but some familiarity w

                                        • Node.js

                                          Notable changes Add support for externally shared js builtins By default Node.js is built so that all dependencies are bundled into the Node.js binary itself. Some Node.js distributions prefer to manage dependencies externally. There are existing build options that allow dependencies with native code to be externalized. This commit adds additional options so that dependencies with JavaScript code

                                            Node.js
                                          • Node.js — Node.js v22.10.0 (Current)

                                            Or if the package is only meant to be run on Node.js and wants to fallback to CJS on older versions that don't have require(esm): { "type": "module", "exports": { // On new version of Node.js, both require() and import get the ESM version "module-sync": "./index.js", // On older version of Node.js, where "module-sync" and require(esm) are // not supported, use the CJS version to avoid dual-package

                                              Node.js — Node.js v22.10.0 (Current)
                                            • 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

                                              • 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

                                                • 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
                                                  • Node.js — Node.js v23.0.0 (Current)

                                                    2024-10-16, Version 23.0.0 (Current), @RafaelGSS We’re excited to announce the release of Node.js 23! Key highlights include: Enabling require(esm) by default for Node.js applications Removing support for Windows 32-bit systems Stabilizing the node --run command Enhancements to the test runner, including glob pattern support for coverage files Node.js 23 will replace Node.js 22 as the ‘Current’ re

                                                      Node.js — Node.js v23.0.0 (Current)
                                                    • Announcing Optuna 3.4 - Preferred Networks Research & Development

                                                      ハイパーパラメータ自動最適化フレームワークOptunaの新しいバージョンであるv3.4がリリースされました。今回のリリースには、ユーザーの相対的な評価結果をもとに最適化を行う新機能 “Preferential Optimization” や、ファイル管理機構、Jupyter Lab拡張、VS Code拡張が含まれています。 ✨ハイライト機能 選好に基づく最適化 (Preferential Optimization) 今回のリリースでは、選好に基づく最適化 (Preferential Optimization)が導入されました。この機能は、画像生成や音声合成、自然言語生成タスクのように、生成物の定量的な評価が難しく、人間が主観的な評価をつける必要があるタスクにおいて特に有用です。 Optuna 3.2においてサポートされたHuman-in-the-Loop最適化では、絶対評価のみが可能となっ

                                                        Announcing Optuna 3.4 - Preferred Networks Research & Development
                                                      • Logging C Function Calls

                                                        May 19th, 2022 @ justine's web page Logging C Functions One of my favorite features of the Cosmopolitan Libc runtime is its --ftrace flag that logs C function calls. It's the simplest system for debugging programs I've ever used and it surprises me that I found no evidence of someone having invented it before. Here's one of its most important use cases. Have you ever had you debugger stupified by

                                                        • From Python to Elixir Machine Learning

                                                          As Elixir's Machine Learning (ML) ecosystem grows, many Elixir enthusiasts who wish to adopt the new machine learning libraries in their projects are stuck at a crossroads of wanting to move away from their existing ML stack (typically Python) while not having a clear path of how to do so. I would like to take some time to talk to WHY I believe now is a good time to start porting over Machine Lear

                                                            From Python to Elixir Machine Learning
                                                          • Red Hat Enterprise LinuxのHigh Availability Add-OnでActive/Standby構成のクラスターを組んでみた | DevelopersIO

                                                            参考: Amazon EC2 オンデマンド料金 どちらのインスタンスファミリーも、インスタンスサイズが大きくなればなるほど、Red Hat Enterprise Linux HAのオンデマンド料金はRHELのオンデマンド料金に近似していくことが分かります。 クラスター構成を組む必要がある場合、ユースケースにもよりますが、処理性能などの関係で大きめのインスタンスサイズを選択することが多いと思います。大きめのインスタンスサイズを選択したとしても、素のRHELからそこまで大きな追加課金が派生しないのは嬉しいポイントですね。 やってみた 検証環境 今回検証を行う環境は以下の通りです。 3つEC2インスタンスを用意したのはスプリッドブレイン対策です。 HA Add-Onでは、クォーラムデバイスによるスプリッドブレイン対策も可能ですが、今回は3ノード構成でクラスターを組んでみます。 クォーラムデバイス

                                                              Red Hat Enterprise LinuxのHigh Availability Add-OnでActive/Standby構成のクラスターを組んでみた | DevelopersIO
                                                            • Node.js

                                                              Notable Changes Add fetch API Adds experimental support to the fetch API. This adds a --experimental-fetch flag that installs the fetch, Request, Response and Headers globals. [76a229c4ff] - (SEMVER-MINOR) lib: add fetch (Michaël Zasso) #41749 Add stream methods [1ae648567a] - (SEMVER-MINOR) stream: add iterator helper find (linkgoron) #41849 [62e1a68077] - (SEMVER-MINOR) stream: add toArray (Benj

                                                                Node.js
                                                              • redbean 2.0 release notes

                                                                redbean is a webserver in a zip executable that runs on six operating systems. The basic idea is if you want to build a web app that runs anywhere, then you download the redbean.com file, put your .html and .lua files inside it using the zip command, and then you've got a hermetic app you can deploy and share. I introduced this web server about a year ago on Hacker News, where it became the third

                                                                • Expert used ChatGPT-4o to create a replica of his passport in just 5 minutes bypassing KYC

                                                                  SECURITY AFFAIRS MALWARE NEWSLETTER ROUND 41 | Security Affairs newsletter Round 519 by Pierluigi Paganini – INTERNATIONAL EDITION | China admitted its role in Volt Typhoon cyberattacks on U.S. infrastructure | Symbolic Link trick lets attackers bypass FortiGate patches, Fortinet warns | Attackers are exploiting recently disclosed OttoKit WordPress plugin flaw | Laboratory Services Cooperative dat

                                                                    Expert used ChatGPT-4o to create a replica of his passport in just 5 minutes bypassing KYC
                                                                  • Flipping Pages: An analysis of a new Linux vulnerability in nf_tables and hardened exploitation techniques

                                                                    This blogpost is the next instalment of my series of hands-on no-boilerplate vulnerability research blogposts, intended for time-travellers in the future who want to do Linux kernel vulnerability research. Specifically, I hope beginners will learn from my VR workflow and the seasoned researchers will learn from my techniques. In this blogpost, I'm discussing a bug I found in nf_tables in the Linux

                                                                    • Using AWS CodePipeline for deploying container images to AWS Lambda Functions | Amazon Web Services

                                                                      AWS DevOps & Developer Productivity Blog Using AWS CodePipeline for deploying container images to AWS Lambda Functions AWS Lambda launched support for packaging and deploying functions as container images at re:Invent 2020. In the post working with Lambda layers and extensions in container images, we demonstrated packaging Lambda Functions with layers while using container images. This post will t

                                                                        Using AWS CodePipeline for deploying container images to AWS Lambda Functions | Amazon Web Services
                                                                      • はじめての自然言語処理 ELECTRA(BERT の事前学習手法の改良)による固有表現抽出の検証 | オブジェクトの広場

                                                                        今回は BERT における事前学習の改良手法である ELECTRA の検証です。ELECTRA はモデルサイズ、データ、計算量が同一条件であればオリジナルの BERT を凌ぐ性能とのことなので結果が楽しみなところです。事前学習をした後のファインチューニングは、いつも livedoor News Corpus の文書分類ばかりだったので、今回は固有表現抽出を試すことにしました。 1. はじめに 今回は BERT における事前学習の改良手法である ELECTRA 1 の検証です。 BERT に関しては 第3回 で取り上げていますが、トークン化が Sentencepiece である為、トークン単位での処理に難がありました2。今回は ELECTRA を試すにあたり、そのあたりの対応も入れ、 Megagon Labs さんから公開されている UD_Japanese-GSD v2.6-NE 3 を使っ

                                                                          はじめての自然言語処理 ELECTRA(BERT の事前学習手法の改良)による固有表現抽出の検証 | オブジェクトの広場
                                                                        • Why APL is a language worth knowing

                                                                          “A language that doesn't affect the way you think about programming, is not worth knowing.”, by Alan J. Perlis. Why APL is a language worth knowing Alan Perlis, the computer scientist recipient of the first Turing award, wrote “A language that doesn't affect the way you think about programming, is not worth knowing.” ― Alan J. Perlis, 1982. Special feature: Epigrams on programming. ACM Sigplan Not

                                                                            Why APL is a language worth knowing
                                                                          • The case for containers on Lambda (with benchmarks)

                                                                            Lambda recently improved the cold start performance of container images by up to 15x, but this isn't the only reason you should use them. The tooling, ecosystem, and entire developer culture has moved to container images and you should too. January 2, 2024 When AWS Lambda first introduced support for container-based functions, the initial reactions from the community were mostly negative. Lambda i

                                                                              The case for containers on Lambda (with benchmarks)
                                                                            • Accelerating PyTorch with CUDA Graphs – PyTorch

                                                                              Today, we are pleased to announce a new advanced CUDA feature, CUDA Graphs, has been brought to PyTorch. Modern DL frameworks have complicated software stacks that incur significant overheads associated with the submission of each operation to the GPU. When DL workloads are strong-scaled to many GPUs for performance, the time taken by each GPU operation diminishes to just a few microseconds and, i

                                                                                Accelerating PyTorch with CUDA Graphs – PyTorch
                                                                              • Node.js

                                                                                Notable Changes [6349b1d673] - (SEMVER-MINOR) dns: add a cancel() method to the promise Resolver (Szymon Marczak) #33099 [9ce9b016e6] - (SEMVER-MINOR) events: add max listener warning for EventTarget (James M Snell) #36001 [8390f8a86b] - (SEMVER-MINOR) http: add support for abortsignal to http.request (Benjamin Gruenbaum) #36048 [9c6be3cc90] - (SEMVER-MINOR) http2: allow setting the local window s

                                                                                  Node.js
                                                                                • Node.js

                                                                                  2023-11-14, Version 21.2.0 (Current), @targos Notable Changes [e25c65ee2f] - doc: add MrJithil to collaborators (Jithil P Ponnan) #50666 [f2366573f9] - doc: add Ethan-Arrowood as a collaborator (Ethan Arrowood) #50393 [eac9cc5fcb] - (SEMVER-MINOR) esm: add import.meta.dirname and import.meta.filename (James Sumners) #48740 [7e151114b1] - fs: add stacktrace to fs/promises (翠 / green) #49849 [6dbb28

                                                                                    Node.js