並び順

ブックマーク数

期間指定

  • から
  • まで

1 - 40 件 / 139件

新着順 人気順

if variable not none in pythonの検索結果1 - 40 件 / 139件

  • Command Line Interface Guidelines

    Contents Command Line Interface Guidelines An open-source guide to help you write better command-line programs, taking traditional UNIX principles and updating them for the modern day. Authors Aanand Prasad Engineer at Squarespace, co-creator of Docker Compose. @aanandprasad Ben Firshman Co-creator Replicate, co-creator of Docker Compose. @bfirsh Carl Tashian Offroad Engineer at Smallstep, first e

      Command Line Interface Guidelines
    • Ubuntu 24.04 LTS サーバ構築手順書

      0 issue "letsencrypt.org" 0 issuewild "letsencrypt.org" 0 iodef "mailto:yourmail@example.jp" §OS再インストール 初期設定で期待通りの設定ができていない場合は、OSの再インストールをする。 さくらVPSのコントロールパネルから、OSを再インストールするサーバを選ぶ。 www99999ui.vs.sakura.ne.jp §OSのインストール操作 Ubuntu 24.04 LTS を選ぶ。 OSインストール時のパケットフィルタ(ポート制限)を無効にして、ファイアウォールは手動で設定することにする。 初期ユーザのパスワードに使える文字が制限されているので、ここでは簡単なパスワードにしておき、後ですぐに複雑なパスワードに変更する。 公開鍵認証できるように公開鍵を登録しておく。 §秘密鍵と公開鍵の作成 ク

        Ubuntu 24.04 LTS サーバ構築手順書
      • LangChainを使わない - ABEJA Tech Blog

        TL; DR LangChainのメリデメを整理する過程で、今となってはopenai-pythonのうちChatGPTのAPIをを簡単に取り回せる程度のシンプルなライブラリがあるだけでも十分便利なんじゃないかと思ったので、ライブラリを個人で作ってみました。(バージョン0.0.1なのでちょっとお粗末な所もありますが) github.com はじめに こんにちは、データサイエンティストの坂元です。ABEJAアドベントカレンダーの13日目の記事です。世は大LLM時代ということで、ありがたいことにABEJAでも複数のLLMプロジェクトを推進させて頂いています。私自身もいくつかのLLMプロジェクトに参画しています。LLMといえばLangChainが便利ですね。OpenAI APIの利用だけでなく、各種ドキュメントのパースが出来たり、HuggingFaceやインデックスDBを扱う他のライブラリとインテ

          LangChainを使わない - ABEJA Tech Blog
        • OpenAI API ドキュメント 日本語訳|#2 GET STARTED 後編|ゑぐみかるちゃあ

          OpenAI API ドキュメントの日本語訳をこちらでまとめます。文字量の多いドキュメントなので、セクションごとに記事を分割しています。 今回は「GET STARTED 」のセクションからLibraries 、Models、TutorialsそしてUsage policiesを抜粋した後編です。 基本 DeepLで翻訳して、気になるところだけ書き換えています(ほぼ気になるところがないのが、DeepLのすごいところ)。原文との突き合わせができるようにはじめに原文を入れてますので、間違いなど見つけられましたら、ぜひご指摘ください。ご指摘箇所は随時反映させていただきます。 原文のリンクが有効になってますので、それぞれ必要な場合は原文リンクの方を参照ください。 前回のおさらいはこちら Python library|Python ライブラリWe provide a Python library, w

            OpenAI API ドキュメント 日本語訳|#2 GET STARTED 後編|ゑぐみかるちゃあ
          • research!rsc: Coroutines for Go

            This post is about why we need a coroutine package for Go, and what it would look like. But first, what are coroutines? Every programmer today is familiar with function calls (subroutines): F calls G, which stops F and runs G. G does its work, potentially calling and waiting for other functions, and eventually returns. When G returns, G is gone and F continues running. In this pattern, only one fu

            • 第850回 UbuntuにおけるシステムPythonと、Pythonの仮想環境を使い分ける方法 | gihyo.jp

              バージョンについては2025年2月時点での数字です。UbuntuのシステムPythonの場合、同じリリースでもマイクロバージョン(X.Y.Zの「Z」の部分)についてはアップグレードされることがあります。 UbuntuではもともとPython 2を使っていました。その後、Python 3へと段階的に移行し、2017年10月にリリースされた17.10からデスクトップ版でもPython 2が標準ではインストールされなくなりました。それからもPython 2のパッケージ自体は存在したのですが、2024年4月の24.04までにPython 2関連パッケージはすべてインストールできないようになっています。 ちなみにリリースによっては、「⁠複数のバージョンのPython」を提供していることもあります。たとえばUbuntu 22.04 LTSのシステムPythonのバージョンは3.10.6ですが、「⁠py

                第850回 UbuntuにおけるシステムPythonと、Pythonの仮想環境を使い分ける方法 | gihyo.jp
              • NETGEAR社製ルーターにおける認証不要の任意コード実行の技術的解説(PSV-2022-0044) - GMO Flatt Security Blog

                ※本記事は先立って公開された英語版記事を翻訳し、日本語圏の読者向けに一部改変したものです。 画像出典: https://www.netgear.com/business/wifi/access-points/wac124/ はじめに こんにちは、株式会社Flatt Securityのstypr(@stereotype32)です。 一昨年、日本のOSS製品で発見された0day脆弱性に関する技術解説をブログに書きました。 それ以来、私は様々な製品に多くの脆弱性を発見してきました。残念ながら私が見つけたバグのほとんどはすぐに修正されなかったので、今日まで私が見つけた、技術的に興味深い脆弱性の情報を共有する機会がありませんでした。 本記事では、NETGEAR社のWAC124(AC2000)ルーターにおいて、様々な脆弱性を発見し、いくつかの脆弱性を連鎖させて、前提条件なしに未認証ユーザーの立場からコ

                  NETGEAR社製ルーターにおける認証不要の任意コード実行の技術的解説(PSV-2022-0044) - GMO Flatt Security Blog
                • 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

                  • 【ChatGPT】GPT-4でPythonの画像ビューワを作成してみた | DevelopersIO

                    新規事業統括部の山本です。 今日OpenAIのChatGPTのモデルとして、GPT-4が利用可能になりました。早速使ってみようと思います。 やってみる 今回は画像のビューワを作成してみます。ちょうどデータセットの画像や、画像モデルに入力した結果を表示するツールがほしいと思っていました。 import os import tkinter as tk from tkinter import filedialog from PIL import Image, ImageTk def browse_folder(): folder_path = filedialog.askdirectory() if not folder_path: return images_frame.delete("all") load_images(folder_path) def load_images(folder_

                      【ChatGPT】GPT-4でPythonの画像ビューワを作成してみた | DevelopersIO
                    • Amazon Linux 2023がGAされました | DevelopersIO

                      抜粋 : Release cadence - Amazon Linux 2023 メジャーリリースとマイナーリリースの内容は以下AWS公式ドキュメントに記載されています。メジャーリリース時には互換性があるか十分に検証した上でアップデートしましょう。 Major version release— Includes new features and improvements in security and performance across the stack. The improvements might include major changes to the kernel, toolchain, Glib C, OpenSSL, and any other system libraries and utilities. Major releases of Amazon Linux ar

                        Amazon Linux 2023がGAされました | DevelopersIO
                      • LMQL(Language Model Query Language)概観|mah_lab / 西見 公宏

                        LMQL Playgroundでクエリを試すLMQLには動作を簡単に検証できるPlaygroundが用意されています。ローカルでPlaygroundを起動することもできます。 まずはGetting Startedで紹介されている以下のクエリを実行します。 argmax "Hello[WHO]" from "openai/text-ada-001" where len(WHO) < 10「Run」ボタンをクリックするとOpenAIのAPI KEYを求められるので、入力します。 実行するとModel Responseの枠に結果が表示されます。 LMQLの基本構造LMQLは記法的にはSQLと似ていて、以下のような構造を持っています。 デコーダ節(Decoder Clause): テキスト生成に使用するデコード・アルゴリズムを指定します。LMQLでは様々なデコード・アルゴリズムを選択することができ

                          LMQL(Language Model Query Language)概観|mah_lab / 西見 公宏
                        • 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

                          • 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

                            • Modern Emacs Typescript Web (React) Config with lsp-mode, treesitter, tailwind, TSX & more - Ovi Stoica

                              Table of Contents Introduction Part 1: Treesitter for Typescript & TSX LSP Support Completion setup Linter setup LSP Setup Eslint (Optional) Tailwind LSP Server LSP Performance Emacs LSP Booster Structural editing Formatting buffers with Prettier Other resources Conclusion Introduction I've worked within the JS ecosystem for the past 8 years using editors like Webstorm and VSCode, I started using

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

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

                                  ChatGPT Retrieval Pluginに任意のベクトル検索エンジンProviderを実装する - エムスリーテックブログ
                                • 【Python】これはするな選手権 - Qiita

                                  まえがき おはようございます。 諸事情によりPythonについての技術書を読むことになったのですが、 掲載されているいくつかのコードを見ていると「えぇ…」と思うことが多々ありましたので、ここで共有したいと思います。 なお、この記事は特定の書籍ないしは出版社、著者、その他を批判するためのものではないこと、あらかじめご了承ください。 (強いて言うなら、こういった書き方をするPythonistaを全般的に批判しているかもしれません) None比較を==でするな 特定のオブジェクトがNone(多言語であればnull)であるかどうかを検証するときの話です。 a == Noneと書いているようであれば、それはa is Noneに書き直したほうが良いかもしれません。 なぜ? Pythonにおいて、Noneはシングルトンです。 つまり、Noneというオブジェクトはランタイム全体で共有され、同じメモリアドレ

                                    【Python】これはするな選手権 - Qiita
                                  • 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

                                    • WebAssembly: Docker without containers!

                                      This is a companion article to a talk about Docker+WebAssembly that we gave at "Docker Community All Hands 7, Winter Edition" on Dec 15th, 2022. Introduction Recently Docker announced support for WebAssembly in cooperation with WasmEdge. This article will explain what is WebAssembly, why it is relevant to the Docker ecosystem and provide some hands-on examples to try on. We assume you are familiar

                                        WebAssembly: Docker without containers!
                                      • 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
                                        • Rewriting the Ruby parser

                                          At Shopify, we have spent the last year writing a new Ruby parser, which we’ve called YARP (Yet Another Ruby Parser). As of the date of this post, YARP can parse a semantically equivalent syntax tree to Ruby 3.3 on every Ruby file in Shopify’s main codebase, GitHub’s main codebase, CRuby, and the 100 most popular gems downloaded from rubygems.org. We recently got approval to merge this work into C

                                            Rewriting the Ruby parser
                                          • 第752回 RISC-VのシングルボードコンピューターであるVisionFive 2を使ってみる | gihyo.jp

                                            今回はStarFive Technology製のRISC-Vシングルボードコンピューター(SBC)であるVisionFive 2にDebianをインストールして、その性能を計測してみましょう。 RISC-VとVisionFive 2 RISC-V(りすく・ふぁいぶ)は今もっとも熱い命令セットアーキテクチャーです。2010年頃に生まれたRISC-Vは、オープンな規格という強みを活かしてどんどんエコシステムを構築し、今では様々な企業がRISC-Vに本格的に手を出す状況になっています。AMD64/Intel 64やARMには性能も普及度合いもまだまだ及びませんが、今の勢いを維持できれば近い将来その状況は変わってくるでしょう。 本連載でも2018年ぐらいから、RISC-Vの記事を何度か取り上げていました。 第505回:「オープン規格の新しい命令セットアーキテクチャRISC-V入門 ツールチェインを

                                              第752回 RISC-VのシングルボードコンピューターであるVisionFive 2を使ってみる | gihyo.jp
                                            • 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
                                              • ChatGPT および API統合 のためのMCPサーバ構築|npaka

                                                以下の記事が面白かったので、簡単にまとめました。 ・Building MCP servers for ChatGPT and API integrations 1. はじめに「MCP」は、AIモデルに追加ツールや知識を拡張するための業界標準となりつつあるオープンプロトコルです。「リモートMCPサーバ」は、インターネット経由でモデルを新しいデータソースや機能に接続するために使用できます。 このガイドでは、プライベートデータソース (ベクターストア) からデータを読み取り、API経由でChatGPTで利用する「リモートMCPサーバ」の構築方法について説明します。 【注意】開発者モードベータ版では、完全なMCPコネクタを構築して使用できます。ProおよびPlusユーザーは、「設定 → コネクタ → 詳細設定 → 開発者モード」を有効化してください。 2. データソースの設定「リモートMCPサーバ

                                                  ChatGPT および API統合 のためのMCPサーバ構築|npaka
                                                • Memory Allocation

                                                  One thing that all programs on your computer have in common is a need for memory. Programs need to be loaded from your hard drive into memory before they can be run. While running, the majority of what programs do is load values from memory, do some computation on them, and then store the result back in memory. In this post I'm going to introduce you to the basics of memory allocation. Allocators

                                                    Memory Allocation
                                                  • Snowflakeの力を引き出すためのdbtを活用したデータ基盤開発の全貌 - CARTA TECH BLOG

                                                    当記事は、dbtのカレンダー | Advent Calendar 2023 - Qiita の23日目の記事です。 こんにちは、株式会社CARTA MARKETING FIRMのデータエンジニア、@pei0804です。データエンジニアリングのほか、組織運営やデータエンジニア育成にも携わっています。 本記事では、Snowflakeを中心とした当社のデータ基盤「Vision」と、その中核であるdbtの利用について深掘りします。dbtを活用することで、SQLのみでデータパイプラインを効率的に構築し、作業の効率化を図っています。 dbt導入の詳しい導入背景は以下のスライドでご覧いただけます:広告レポーティング基盤に、dbtを導入したら別物になった話 / tokyo-dbt-meetup-4 - Speaker Deck。 私たちのチームでは、ビジネスに直接価値を提供しているdbtモデルの開発はプロ

                                                      Snowflakeの力を引き出すためのdbtを活用したデータ基盤開発の全貌 - CARTA TECH BLOG
                                                    • 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
                                                      • 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
                                                        • How to create a Python package in 2022

                                                          Photo by Claudio Schwarz on Unsplash. How to create a Python package? In order to create a Python package, you need to write the code that implements the functionality you want to put in your package, and then you need to publish it to PyPI. That is the bare minimum. Nowadays, you can also set up a variety of other things to make your life easier down the road: continuous testing of your package;

                                                            How to create a Python package in 2022
                                                          • 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
                                                            • March 2025 (version 1.99)

                                                              Update 1.99.1: The update addresses these security issues. Update 1.99.2: The update addresses these issues. Update 1.99.3: The update addresses these issues. Downloads: Windows: x64 Arm64 | Mac: Universal Intel silicon | Linux: deb rpm tarball Arm snap Welcome to the March 2025 release of Visual Studio Code. There are many updates in this version that we hope you'll like, some of the key highligh

                                                                March 2025 (version 1.99)
                                                              • TypeScript and the dawn of gradual types

                                                                The FullScreenMario project burned brightly for a few short weeks in October 2013 after Boing Boing lauded it as “a pretty impressive example of what HTML5, in-browser functionality can do.” A few days later, it went viral on Reddit and by November, attention turned to scrutiny, and Nintendo took the project down with a DMCA request. Josh Goldberg speaks of his former project with a bit of pride—i

                                                                  TypeScript and the dawn of gradual types
                                                                • AST vs. Bytecode: Interpreters in the Age of Meta-Compilation

                                                                  233 AST vs. Bytecode: Interpreters in the Age of Meta-Compilation OCTAVE LAROSE, University of Kent, UK SOPHIE KALEBA, University of Kent, UK HUMPHREY BURCHELL, University of Kent, UK STEFAN MARR, University of Kent, UK Thanks to partial evaluation and meta-tracing, it became practical to build language implementations that reach state-of-the-art peak performance by implementing only an interprete

                                                                  • Announcing TypeScript 5.2 RC - TypeScript

                                                                    Today we’re excited to announce our Release Candidate of TypeScript 5.2! Between now and the stable release of TypeScript 5.2, we expect no further changes apart from critical bug fixes. To get started using the RC, you can get it through NuGet, or through npm with the following command: npm install -D typescript@rc Here’s a quick list of what’s new in TypeScript 5.2! using Declarations and Explic

                                                                      Announcing TypeScript 5.2 RC - TypeScript
                                                                    • April 2022 (version 1.67)

                                                                      Join a VS Code Dev Days event near you to learn about AI-assisted development in VS Code. Update 1.67.1: The update addresses this security issue. Update 1.67.2: The update addresses these issues. Downloads: Windows: x64 Arm64 | Mac: Universal Intel silicon | Linux: deb rpm tarball Arm snap Welcome to the April 2022 release of Visual Studio Code. There are many updates in this version that we hope

                                                                        April 2022 (version 1.67)
                                                                      • 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)
                                                                        • Parsing SQL - Strumenta

                                                                          The code for this tutorial is on GitHub: parsing-sql SQL is a language to handle data in a relational database. If you worked with data you have probably worked with SQL. In this article we will talk about parsing SQL. It is in the same league of HTML: maybe you never learned it formally but you kind of know how to use it. That is great because if you know SQL, you know how to handle data. However

                                                                            Parsing SQL - Strumenta
                                                                          • 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
                                                                            • Building a Toy Programming Language in Python

                                                                              I thought it would be fun to go outside of my comfort zone of web development topics and write about something completely different and new, something I have never written about before. So today, I'm going to show you how to implement a programming language! The project will parse and execute programs written in a simple language I called my (I know it's a lame name, but hey, it is "my" language).

                                                                                Building a Toy Programming Language in Python
                                                                              • 開発品質とDeveloper eXperienceを高めるコンテナ開発環境のご紹介 (Python) - ABEJA Tech Blog

                                                                                はじめに こんにちは 2023年1月に入社し、システム開発グループでエンジニアをしてる春名です。 私の所属しているシステム開発グループでは、開発初期の環境構築をより効率的に行うための活動に取り組んでいます。 今回はそのうちの一つである、Pythonでコンテナ開発をする環境を構築した内容をご紹介します。 なぜコンテナ開発環境かと言いますと、単にAWSのECSやGoogle CloudのCloud Runを使ってデリバリーする案件が多いからです。 より使用頻度の高い開発環境を整備し、テンプレート化しておくことで開発の効率化に活用しています。 目次 はじめに 目次 今回作成する環境 Poetryによるプロジェクトの作成 Poetryのインストール プロジェクトの作成 poetryの設定 .gitignoreの作成 依存関係の追加 FastAPI Ruff / Black / mypy / pyt

                                                                                  開発品質とDeveloper eXperienceを高めるコンテナ開発環境のご紹介 (Python) - ABEJA Tech Blog
                                                                                • 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 '