並び順

ブックマーク数

期間指定

  • から
  • まで

1 - 40 件 / 99件

新着順 人気順

python for index and item in listの検索結果1 - 40 件 / 99件

  • 大実験!ChatGPTは競プロの問題を解けるのか (2024年5月版) - E869120's Blog

    1. はじめに 2024 年 5 月 14 日、OpenAI 社から新たな生成 AI「GPT-4o」が発表され、世界に大きな衝撃を与えました。これまでの GPT-4 よりも性能を向上させただけでなく1、音声や画像のリアルタイム処理も実現し、さらに応答速度が大幅に速くなりました。「ついにシンギュラリティが来てしまったか」「まるで SF の世界を生きているような感覚だ」という感想も見受けられました。 しかし、いくら生成 AI とはいえ、競技プログラミングの問題を解くのは非常に難しいです。なぜなら競技プログラミングでは、問題文を理解する能力、プログラムを実装する能力だけでなく、より速く答えを求められる解法 (アルゴリズム) を考える能力も要求されるからです。もし ChatGPT が競技プログラミングを出来るようになれば他のあらゆるタスクをこなせるだろう、と考える人もいます。 それでは、現代最強の

      大実験!ChatGPTは競プロの問題を解けるのか (2024年5月版) - E869120's Blog
    • ぼくのMac環境 ver.のんピ | DevelopersIO

      何年後かの自分へ こんにちは、のんピ(@non____97)です。 業務で使用する新しいMacが届きました。 新しいMacを初期セットアップするにあたって「今の設定どうだったっけ...」と調べる時間が結構かかってしまいました ということで何年後かの自分がまた新しいMacに乗り換える際に手間取らないように、設定した内容を書き記しておきます。 移行先のMacの情報は以下の通りです。M1 Max、嬉しい。 # OSのバージョンの確認 > sw_vers ProductName: macOS ProductVersion: 12.4 BuildVersion: 21F79 # カーネルのバージョン確認 > uname -r 21.5.0 # CPUのアーキテクチャの確認 > uname -m arm64 # CPUの詳細確認 > sysctl -a machdep.cpu machdep.cpu.

        ぼくのMac環境 ver.のんピ | DevelopersIO
      • ElasticsearchとKibela APIを使ってSlackでのCSお問い合わせ対応業務を改善した話 - BASEプロダクトチームブログ

        この記事はBASE Advent Calendar 2020の11日目の記事です。 devblog.thebase.in BASE株式会社 Data Strategy チームの@tawamuraです。 BASEではオーナーの皆様や購入者様のお問い合わせに対して、Customer Supportチームが主となって対応をしています。その中でもいくつかの技術的なお問い合わせに対しては、以下のようにSlackの専用チャンネルを通して開発エンジニアに質問を投げて回答を作成することになっています。 CSチームから調査を依頼されるお問い合わせの例 これらのCS問い合わせ対応は日々いくつも発生しており、CSお問い合わせ対応を当番制にして運用してみた話 でもあるように週ごとに持ち回り制で各部門のエンジニアが対応しているのですが、どうしても調査や対応に時間が取られてしまうという問題が発生していました。 dev

          ElasticsearchとKibela APIを使ってSlackでのCSお問い合わせ対応業務を改善した話 - BASEプロダクトチームブログ
        • neue cc - Claudia - Anthropic ClaudeのC# SDKと現代的なC#によるウェブAPIクライアントの作り方

          AI関連、競合は現れども、性能的にやはりOpenAI一強なのかなぁというところに現れたAnthropic Claude 3は、確かに明らかに性能がいい、GPT-4を凌駕している……!というわけで大いに気に入った(ついでに最近のOpenAIのムーブが気に入らない)ので、C#で使い倒していきたい!そこで、まずはSDKがないので非公式SDKを作りました。こないだまでプレビュー版を流していたのですが、今回v1.0.0として出します。ライブラリ名は、Claudeだから、Claudiaです!.NET全般で使えるのと、Unity(Runtime/Editor双方)でも動作確認をしているので、アイディア次第で色々活用できると思います。 GitHub - Cysharp/Claudia 今回のSDKを作るにあたっての設計指針の一番目は、公式のPython SDKやTypeScript SDKと限りなく似せる

          • BlenderとPythonとUnityで巨大な立体迷路を作成する - Qiita

            このようなゲームを作りました。基本的には迷路のゲームです。 サイトのリンク 本記事ではこのゲームの製作過程を掲載すると共に、きっと有益にな情報をまとめます。楽しんで頂けたら幸いです。 Step0 前提 まず用語を整理します。 Blender : 3DCG制作ソフト。Pythonによって操作が可能になっています。 Python : 言わずと知れた有名プログラミング言語。 Unity : ゲーム制作ソフト。スタート画面の表示やゲームオーバーの判定などをしてくれます。言語はC#です。 大まかな流れとしては、 Step1. Blenderで3Dオブジェクトを作成 Step2. Pythonでそれを迷路に組み立てる Step3. Unityでゲームとして完成させる という風になっています。 コードに関しては、読みやすさも考え記事中においては一部抜粋に留めています。もし全体のコードを知りたい場合はプル

              BlenderとPythonとUnityで巨大な立体迷路を作成する - Qiita
            • yt-dlp オプション一覧及びそのメモ - †MASAYOSHI†のオンラインメモ帳

              youtube-dlの開発が止まっておりfork版のyt-dlpに移る事にした。yt-dlpはyoutube-dlのforkであるyoutube-dlcのそのまたforkになる。オリジナルであるyoutube-dlのオプション解説はyoutube-dl オプション一覧及びそのメモ。 2022/06/19更新 2022/09/06更新 OPTIONS -h, --helpヘルプを表示する。 --versionプログラムのVerを表示する。 -U, --update --no-update (default)プログラムのupdateを実行するかどうか。 -i, --ignore-errorsダウンロードエラーを無視する。プレイリストごとダウンロードするような時に使う。エラーで失敗してもダウンロードは成功したとみなされる。 --no-abort-on-error (default) --abor

                yt-dlp オプション一覧及びそのメモ - †MASAYOSHI†のオンラインメモ帳
              • Raspberry PiとAWSを利用して子どもたちのゲーム時間を可視化してみた | DevelopersIO

                DynamoDBの作成 さっそくテーブルをCDKで構築してみます。 from aws_cdk import ( Stack, RemovalPolicy, aws_dynamodb as dynamodb, # DynamoDBのライブラリをimport ) from constructs import Construct class GameCounterStack(Stack): def __init__(self, scope: Construct, construct_id: str, **kwargs) -> None: super().__init__(scope, construct_id, **kwargs) # The code that defines your stack goes here # ここから下に追記していきます。 # DynamoDB ログデータ格納用

                  Raspberry PiとAWSを利用して子どもたちのゲーム時間を可視化してみた | DevelopersIO
                • CIの時間を(できるだけ楽して)半分にしてみた - Nealle Developer's Blog

                  こんにちは、ニーリーの佐古です。 現在開発速度や開発者体験の向上のため、取り組みの諸々を遂行しています。 開発者体験とCI 天井の雨漏りが4か月ほど止まらないので私の開発者体験は酷いことになっています。 さて、皆さんCIの待ち時間はお好きですか?私は大嫌いです。 弊社バックエンドリポジトリのPR時CIはプロダクトの成長に合わせて実行時間が順調に伸びており、 開発速度と開発者体験の双方に悪影響をもたらしていました。 実は別チームで改善のための試みがなされたことはあったのですが、 そこで行き当たった問題をある程度解決してどうにかエピソードになる程度の成果を得られたので 簡単に記しておこうと思います。 前提 プロダクトはDjangoで、リポジトリはGitHubで管理されています。 AS-WAS ついこないだまでのPR時CI。 こちらがもともとのGitHub CIのグラフです。 正直経験上そこまで

                    CIの時間を(できるだけ楽して)半分にしてみた - Nealle Developer's Blog
                  • 【機械学習】機械学習を用いたin silico screening【AI創薬】~第2/5章 スクレイピングによる公共データベース(PDB)からの機械学習データを収集~ - LabCode

                    AI創薬とは? AI創薬は、人工知能(AI)技術を利用して新しい薬物を発見、開発するプロセスです。AIは大量のデータを高速に処理し、薬物の候補を予測したり、薬物相互作用を評価したりします。また、AIは薬物の効果や安全性をシミュレートすることも可能で、臨床試験の前の段階でリスクを評価することができます。これにより、薬物開発のコストと時間を大幅に削減することが期待されています。AI創薬は、薬物開発の新しいパラダイムとして注目を集め、製薬企業や研究機関で積極的に研究、導入が進められています。また、バイオインフォマティクス、ケモインフォマティクス、機械学習、ディープラーニングなどの技術が組み合わされ、薬物開発のプロセスを革新しています。さらに、AI創薬は個人化医療の推進にも寄与し、患者にとって最適な治療法を提供する可能性を秘めています。 今回はAI創薬の中でも、in silico screeeni

                    • ソースコード & ドキュメントに対応したGraph RAGの実装(Tree-sitter + LightRAG)

                      (module (function_definition (identifier) # ← ここに関数名「sample_func」が含まれます (parameters) (block (expression_statement (call (identifier) (argument_list (string)))))) (expression_statement (call (identifier) (argument_list)))) ノードが色々取れましたが、「function_definition」が関数、その子である「identifier」が関数名を表すため、 function_definition == 子ノード ==> identifier となっている箇所を探索すれば抽出できます(関数ではあっても「lambda」など異なる場合もあります)。 今回は上記のようにTree-si

                        ソースコード & ドキュメントに対応したGraph RAGの実装(Tree-sitter + LightRAG)
                      • 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

                        • 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

                          • Rustのバックエンド開発の最近の動向を追う

                            はじめにyukiです。RustのカンファレンスであるRust.Tokyoのオーガナイザーを務めているほか、『実践Rustプログラミング入門』『RustによるWebアプリケーション開発』といった書籍を共著で執筆しました。 この記事のテーマは、近年利用が進み人気が高まるRustのバックエンド開発における動向です。前半で、現在人気のあるライブラリの動向を簡単にまとめます。次に、私が現在開発の動向に注目しているいくつかのライブラリについて紹介します。 人気のバックエンド開発ライブラリの動向Rustによるバックエンド開発[1]では、やはり最近でも次の2つのクレートが選ばれる傾向にあるようです。「デファクトスタンダード」と呼べるくらいには、そろそろなってきたのではないでしょうか。 axum actix-web 数年前であればactix-webが一強ではあったものの、近年はtokioチームが開発するax

                              Rustのバックエンド開発の最近の動向を追う
                            • 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

                              • Sublime Text 4

                                The first stable release of Sublime Text 4 has finally arrived! We've worked hard on providing improvements without losing focus on what makes Sublime Text great. There are some new major features that we hope will significantly improve your workflow and a countless number of minor improvements across the board. A huge thanks goes out to all the beta testers on discord and all the contributors to

                                  Sublime Text 4
                                • What We Learned from a Year of Building with LLMs (Part I)

                                  It’s an exciting time to build with large language models (LLMs). Over the past year, LLMs have become “good enough” for real-world applications. The pace of improvements in LLMs, coupled with a parade of demos on social media, will fuel an estimated $200B investment in AI by 2025. LLMs are also broadly accessible, allowing everyone, not just ML engineers and scientists, to build intelligence into

                                    What We Learned from a Year of Building with LLMs (Part I)
                                  • 実験の再現性を高めるデータバージョン管理(DVC)の紹介 - techtekt

                                    データバージョンの管理とは? データバージョンの管理とは、バイナリデータのバージョンを管理することを指します。データバージョンの管理は、Git 等でのコードのバージョン管理をバイナリデータに拡張しています。実験の再現性を高められるメリットがあります。 DVC とは? データのバージョンを管理する機能をもつオープンソースソフトウェアです。データのハッシュをテキストファイルで保持し git でバージョン管理します。また、yaml ファイルで実行パイプラインを定義して監視対象データが更新された際にハッシュを更新することで、新しいハッシュ値を含んだデータをバージョン管理します。更新されたデータファイルはキャッシュディレクトリに保存され、必要なタイミングで自動的に復元されます。 データのリモートリポジトリを定義することで、データ一式を簡単なコマンド操作で S3 等へ push / pull すること

                                      実験の再現性を高めるデータバージョン管理(DVC)の紹介 - techtekt
                                    • June 2022 (version 1.69)

                                      Update 1.69.1: The update addresses these issues. Update 1.69.2: The update addresses these issues. Downloads: Windows: x64 Arm64 | Mac: Universal Intel silicon | Linux: deb rpm tarball Arm snap Welcome to the June 2022 release of Visual Studio Code. There are many updates in this version that we hope you'll like, some of the key highlights include: 3-way merge editor - Resolve merge conflicts wit

                                        June 2022 (version 1.69)
                                      • 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)
                                        • Full Text, Full Archive RSS Feeds for any Blog

                                          RSS and ATOM feeds are problematic (for our use-cases) for two reasons; 1) lack of history, 2) contain limited post content. We built some open-source software to fix that. If you are reading this blog post via a 3rd party source it is very likely that many parts of it will not render correctly (usually, the interactive graphs). Please view the post on dogesec.com for the full interactive viewing

                                            Full Text, Full Archive RSS Feeds for any Blog
                                          • Golang Mini Reference 2022: A Quick Guide to the Modern Go Programming Language (REVIEW COPY)

                                            Golang Mini Reference 2022 A Quick Guide to the Modern Go Programming Language (REVIEW COPY) Harry Yoon Version 0.9.0, 2022-08-24 REVIEW COPY This is review copy, not to be shared or distributed to others. Please forward any feedback or comments to the author. • feedback@codingbookspress.com The book is tentatively scheduled to be published on September 14th, 2022. We hope that when the release da

                                            • 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)
                                                • Improving the Developer Experience with the Ruby LSP - Shopify

                                                  Improving the Developer Experience with the Ruby LSPThe Ruby LSP is a new language server built at Shopify that makes coding in Ruby even better by providing extra Ruby features for any editor that has a client layer for the LSP. In this article, we’ll cover how we built the Ruby LSP, the features included within it, and how you can install it. Ruby has an explicit goal to make developers happy. H

                                                    Improving the Developer Experience with the Ruby LSP - Shopify
                                                  • Better Fbx Importer & Exporter

                                                    About Virus WarningThe Bitdefender Enterprise Support Team has verified that it is a false positive, here is the reply: Hello, Thank you for contacting the Bitdefender Enterprise Support Team. We have received an update from our laboratories. The files are clean and detection should be removed in the next couple of updates. Please let us know if there is anything else we can assist you with or if

                                                      Better Fbx Importer & Exporter
                                                    • 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

                                                      • February 2021 (version 1.54)

                                                        Join a VS Code Dev Days event near you to learn about AI-assisted development in VS Code. Update 1.54.1: The update addresses an issue with an extension dependency. Update 1.54.2: The update addresses these issues. Update 1.54.3: The update addresses this issue. Downloads: Windows: x64 Arm64 | Mac: Universal Intel silicon | Linux: deb rpm tarball Arm snap Welcome to the February 2021 release of Vi

                                                          February 2021 (version 1.54)
                                                        • Patterns for Building LLM-based Systems & Products

                                                          Patterns for Building LLM-based Systems & Products [ llm engineering production 🔥 ] · 66 min read Discussions on HackerNews, Twitter, and LinkedIn “There is a large class of problems that are easy to imagine and build demos for, but extremely hard to make products out of. For example, self-driving: It’s easy to demo a car self-driving around a block, but making it into a product takes a decade.”

                                                            Patterns for Building LLM-based Systems & Products
                                                          • C言語教育はCコンパイラの写経で, OSEK(63) coding(140) - Qiita

                                                            Deleted articles cannot be recovered. Draft of this article would be also deleted. Are you sure you want to delete this article? 若者「C言語教えて下さい」 わい「Cコンパイラ写経すれば3週間でコンパイラ書ける様になります。」 若者「そんな事出来る様になったら忙しくなるから嫌です。」 わい「C言語理解したくないんですか?」 若者「C言語教えて欲しいだけです。」 老害よりたちが悪いか若害は皆で渡れば怖くないから #短歌 — naokiakutagawa (@naokiakutagawa) October 22, 2022 C言語を習得する3つの方法 https://qiita.com/kaizen_nagoya/items/84cab0888c193bba429b

                                                              C言語教育はCコンパイラの写経で, OSEK(63) coding(140) - Qiita
                                                            • Little Languages Are The Future Of Programming

                                                              I’ve become convinced that “little languages”—small languages designed to solve very specific problems—are the future of programming, particularly after reading Gabriella Gonzalez’s The end of history for programming and watching Alan Kay’s Programming and Scaling talk. You should go check them out because they’re both excellent, but if you stick around I’ll explain just what I mean by “little lan

                                                                Little Languages Are The Future Of Programming
                                                              • OpenAI API の Structured Outputs の使い方|npaka

                                                                以下の記事が面白かったので、簡単にまとめました。 ・Introducing Structured Outputs in the API 1. Structured Outputs昨年のDevDayで、「JSONモード」を導入しました。これは、OpenAIのモデルを使用して信頼性の高いアプリを構築しようとしている開発者にとって便利な構成要素です。「JSONモード」は、有効なJSON出力を生成するためのモデルの信頼性を向上させますが、モデルの応答が特定のスキーマに準拠することを保証するものではありません。本日、APIに「Structured Outputs」を導入します。これは、モデルによって生成された出力が、開発者が提供するJSONスキーマと完全に一致するように設計された新機能です。 複雑なJSONスキーマのフォローの評価では、「Structured Outputs」を備えた新しいモデル「g

                                                                  OpenAI API の Structured Outputs の使い方|npaka
                                                                • 0.8.0 Release Notes ⚡ The Zig Programming Language

                                                                  Tier 4 Support § Support for these targets is entirely experimental. If this target is provided by LLVM, LLVM may have the target as an experimental target, which means that you need to use Zig-provided binaries for the target to be available, or build LLVM from source with special configure flags. zig targets will display the target if it is available. This target may be considered deprecated by

                                                                  • January 2025 (version 1.97)

                                                                    Update 1.97.1: The update addresses these security issues. Update 1.97.2: The update addresses these issues. Downloads: Windows: x64 Arm64 | Mac: Universal Intel silicon | Linux: deb rpm tarball Arm snap Welcome to the January 2025 release of Visual Studio Code. There are many updates in this version that we hope you'll like, some of the key highlights include: Next Edit Suggestions (preview) - Co

                                                                      January 2025 (version 1.97)
                                                                    • Fine-tuning: gpt-3.5-turboの活用事例。絵文字分類タスク改善のプロセスと、学びの言語化。|にょす

                                                                      みなさん、Fine-tuning使ってますか!? 一週間ほど前に、OpenAI社からgpt-3.5-turboがFine-tuning可能になったとのアップデートがありましたね。 ニュースを見て凄そうと思いつつ、少し作業のハードルがあったり、プロンプトエンジニアリングで事足りてるから、そんなに使わないかも?🤔と思ってました。 ただ今回、重い腰を上げて、Fine-tuningを試してみたら、想像以上の結果が得られたので、そのプロセスと学びをまとめます! システムに組み込む際の Prompt Engineering で苦戦している皆さん、Fine-tuningはかなり希望になると思います…!これからはPromptをゴニョゴニョするよりも、Fine-tuningに力を入れていこうと思いました。 ではまとめていきます! 前置きとこれまでの課題今回は、音声メモ日記アプリ「シャべマル」の絵文字分類タ

                                                                        Fine-tuning: gpt-3.5-turboの活用事例。絵文字分類タスク改善のプロセスと、学びの言語化。|にょす
                                                                      • CloudFormation一撃で作るAWS料金通知ツール(Email/Slack/LINE対応) | DevelopersIO

                                                                        以前本記事で使用していたLINE Notifyが2025/3/31にサービス終了します。 代わりにLINE Messaging APIへ通知するよう構築手順及びCloudFormationテンプレートを更新したので、今後はこちらをご利用ください。 https://developers.line.biz/ja/news/2024/10/07/line-notify-will-be-discontinued/ こんにちは、つくぼし(tsukuboshi0755)です! 以前以下のブログで、利用しているAWS料金を毎日LINEに通知するツールを構築しました。 上記ブログは様々な方々から大きな反響を頂いた一方で、以下のような課題もありました。 AWS SAMの利用を前提とするため、ローカル開発環境の構築が別途必要 通知間隔として毎日しか指定できない 通知先としてLINEしか指定できない LINE

                                                                          CloudFormation一撃で作るAWS料金通知ツール(Email/Slack/LINE対応) | DevelopersIO
                                                                        • So You Want To Remove The GVL?

                                                                          I want to write a post about Pitchfork, explaining where it comes from, why it is like it is, and how I see its future. But before I can get to that, I think I need to share my mental model on a few things, in this case, Ruby’s GVL. For quite a long time, it has been said that Rails applications are mostly IO-bound, hence Ruby’s GVL isn’t that big of a deal and that has influenced the design of so

                                                                          • March 2022 (version 1.66)

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

                                                                              March 2022 (version 1.66)
                                                                            • 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
                                                                              • 0.10.0 Release Notes ⚡ The Zig Programming Language

                                                                                Tier 4 Support § Support for these targets is entirely experimental. If this target is provided by LLVM, LLVM may have the target as an experimental target, which means that you need to use Zig-provided binaries for the target to be available, or build LLVM from source with special configure flags. zig targets will display the target if it is available. This target may be considered deprecated by

                                                                                • [Python]SQLAlchemyのよくやる使い方まとめ

                                                                                  最近では、PythonのWebアプリのバックエンドで使うことが多く、 そのRDBのDriverとして、SQLAlchemyを採用することが多いです。 (使っているDBはpostgreqlです。) 今回は、SQLAlchemyの実際によく使う使い方をまとめてみました。 どうやって実装したっけ?とよく昔のプロジェクトのソースコードを参照することが多かったので、自分向けのメモとしても残しておきます。 Model編 Base Class 以下のような基底クラスを定義しておき、それを継承させると便利です。 from sqlalchemy.ext.declarative import as_declarative, declared_attr @as_declarative() class Base: @declared_attr def __tablename__(cls): return cls.

                                                                                    [Python]SQLAlchemyのよくやる使い方まとめ