並び順

ブックマーク数

期間指定

  • から
  • まで

1 - 40 件 / 178件

新着順 人気順

python if and else questionsの検索結果1 - 40 件 / 178件

  • 俺が考える最強の「麻雀点数申告練習アプリケーション」を作ってみる ~ Pythonによる麻雀点数計算問題の自動生成と音声による点数申告 ~ - エムスリーテックブログ

    こちらはエムスリー Advent Calendar 2023 1日目の記事です。 Overview エムスリーエンジニアリンググループ AI・機械学習チームでソフトウェアエンジニアをしている中村(po3rin) です。趣味は麻雀でフリー雀荘で毎年200半荘以上打ちます。好きな麻雀プロは園田賢さんです。 麻雀を始めるときに一番の障壁になるのは点数計算ではないでしょうか? 特に符計算が初心者の関門のようです。一方私のような初中級者でも突然のレアな点数申告にまごつくことがあります。 そこで、今回はその人に合った麻雀の点数計算問題(主に符計算が焦点となる問題)を生成して、自分で点数計算&点数申告の練習をする方法を探求したのでその紹介をします。麻雀用語が少しだけ登場するので、対象読者は麻雀を少しでもかじったことのあるエンジニアの方です。 Overview 麻雀の点数計算の難しさ 現状の点数計算の練習

      俺が考える最強の「麻雀点数申告練習アプリケーション」を作ってみる ~ Pythonによる麻雀点数計算問題の自動生成と音声による点数申告 ~ - エムスリーテックブログ
    • 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 後編|ゑぐみかるちゃあ
      • Welcome to Comprehensive Rust 🦀 - Comprehensive Rust 🦀

        Welcome to Comprehensive Rust 🦀 This is a free Rust course developed by the Android team at Google. The course covers the full spectrum of Rust, from basic syntax to advanced topics like generics and error handling. The latest version of the course can be found at https://google.github.io/comprehensive-rust/. If you are reading somewhere else, please check there for updates. The course is availab

        • Building a highly-available web service without a database

          If you’ve ever built a web service or a web app, you know the drill: pick a database, pick a web service framework (and in today’s day and age, pick a front-end framework, but let’s not get into that). This has been the case for several decades now, and people don’t stop to question if this is still the best way to build a web app. Many things have changed in the last decade: Disk is a lot faster

            Building a highly-available web service without a database
          • Agentic Coding Recommendations

            There is currently an explosion of people sharing their experiences with agentic coding. After my last two posts on the topic, I received quite a few questions about my own practices. So, here goes nothing. Preface For all intents and purposes, here’s what I do: I predominently use Claude Code with the cheaper Max subscription for $100 a month 1. That works well for several reasons: I exclusively

              Agentic Coding Recommendations
            • Don't write clean code, write CRISP code — Bitfield Consulting

              I’m sure we’re all in favour of “clean code”, but it’s one of those motherhood-and-apple-pie things that no one can reasonably disagree with. Who wants to write dirty code, unless maybe it’s for a porn site? The problem, of course, is that few of us can agree on what “clean code” means, and how to get there. A rule like “methods should only do one thing”, looks great on a T-shirt, but it’s not so

                Don't write clean code, write CRISP code — Bitfield Consulting
              • The Prompt Engineering Playbook for Programmers

                Developers are increasingly relying on AI coding assistants to accelerate our daily workflows. These tools can autocomplete functions, suggest bug fixes, and even generate entire modules or MVPs. Yet, as many of us have learned, the quality of the AI’s output depends largely on the quality of the prompt you provide. In other words, prompt engineering has become an essential skill. A poorly phrased

                  The Prompt Engineering Playbook for Programmers
                • Building A Virtual Machine inside ChatGPT

                  Unless you have been living under a rock, you have heard of this new ChatGPT assistant made by OpenAI. You might be aware of its capabilities for solving IQ tests, tackling leetcode problems or to helping people write LateX. It is an amazing resource for people to retrieve all kinds of information and solve tedious tasks, like copy-writing! Today, Frederic Besse told me that he managed to do somet

                    Building A Virtual Machine inside ChatGPT
                  • Dify の ワークフロー の概要|npaka

                    以下の記事が面白かったので、簡単にまとめました。 ・Workflow - Dify 1. ワークフロー1-1. ワークフロー「ワークフロー」は、複雑なタスクを小さな「ノード」に分割することで、LLMアプリケーションのモデル推論への依存を減らし、システムの説明可能性、安定性、耐障害性を向上させます。 「ワークフロー」の種類は、次のとおりです。 ・Chatflow :  顧客サービス、セマンティック検索など、応答作成に複数ステップのロジックを必要とする会話シナリオ用 ・Workflow : 高品質な翻訳、データ分析、コンテンツ作成、電子メールの自動化など、自動化・バッチ処理シナリオ用 1-2. Chatflow自然言語入力におけるユーザー意図認識の複雑さに対処するため、「質問分類」「質問書き換え」「サブ質問分割」などの問題理解ノードを提供します。さらに、LLMに外部環境との対話機能、すなわち「

                      Dify の ワークフロー の概要|npaka
                    • 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プロダクトチームブログ
                      • OOP: the worst thing that happened to programming

                        > BTC: bc1qs0sq7agz5j30qnqz9m60xj4tt8th6aazgw7kxr ETH: 0x1D834755b5e889703930AC9b784CB625B3cd833E USDT(Tron): TPrCq8LxGykQ4as3o1oB8V7x1w2YPU2o5n Ton: UQAtBuFWI3H_LpHfEToil4iYemtfmyzlaJpahM3tFSoxomYQ Doge: D7GMQdKhKC9ymbT9PtcetSFTQjyPRRfkwTdismiss OOP: the worst thing that happened to programming [2/24/2025] In this article, we will try to understand why OOP is the worst thing that happened to prog

                          OOP: the worst thing that happened to programming
                        • Reflections on OpenAI

                          I left OpenAI three weeks ago. I had joined the company back in May 2024. I wanted to share my reflections because there's a lot of smoke and noise around what OpenAI is doing, but not a lot of first-hand accounts of what the culture of working there actually feels like. Nabeel Qureshi has an amazing post called Reflections on Palantir, where he ruminates on what made Palantir special. I wanted to

                            Reflections on OpenAI
                          • Introducing Ezno

                            Ezno is an experimental compiler I have been working on and off for a while. In short, it is a JavaScript compiler featuring checking, correctness and performance for building full-stack (rendering on the client and server) websites. This post is just an overview of some of the features I have been working on which I think are quite cool as well an overview on the project philosophy ;) It is still

                              Introducing Ezno
                            • ソースコード & ドキュメントに対応した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)
                              • copilot-explorer

                                Copilot Internals | thakkarparth007.github.io Github Copilot has been incredibly useful to me. It can often magically read my mind and make useful suggestions. The thing that surprised me the most was its ability to correctly “guess” functions/variables from surrounding code – including from other files. This can only happen, if the copilot extension sends valuable information from surrounding cod

                                • Scaling containers on AWS in 2022

                                  This all started with a blog post back in 2020, from a tech curiosity: what's the fastest way to scale containers on AWS? Is ECS faster than EKS? What about Fargate? Is there a difference between ECS on Fargate and EKS on Fargate? I had to know this to build better architectures for my clients. In 2021, containers got even better, and I was lucky enough to get a preview and present just how fast t

                                    Scaling containers on AWS in 2022
                                  • ChatGPT と Whisper で発音練習アプリを作ってみた - NTT docomo Business Engineers' Blog

                                    この記事は NTTコミュニケーションズ Advent Calendar 2023 の15日目の記事です。 この記事では、ChatGPT と 音声認識モデルの Whisper を用いた発音練習アプリケーションをご紹介します。 ChatGPT に読み上げる文章を考えてもらい、その文章の読み上げた音声を Whisper で文字起こしします。 正確に発音できていれば、正確に文字起こしできる、という考えから、 原稿と文字起こし結果を比較すれば発音練習に使えるのではないかと考えました。 実際に使ってみた結果、発音のどこが悪かったのかといったフィードバックはもらえませんが、 自分の発話した音声に対して評価がつくだけでも、結構楽しく練習できると感じました。 音声認識を活用したアプリケーションは、一般に音声認識精度がネックになると思いますが、 このアプリケーションは音声認識精度が100%ではないことを逆手に

                                      ChatGPT と Whisper で発音練習アプリを作ってみた - NTT docomo Business Engineers' Blog
                                    • Interview with Ryan Dahl, Node.js & Deno creator by Evrone

                                      In an interview with Evrone, Ryan Dahl speaks about the main challenges in Deno, the future of JavaScript and TypeScript, and tells how he would have changed his approach to Node.js if he could travel back in time. We met with Ryan Dahl, the creator of Node.js, to discuss the origins of the platform, its impact on JavaScript, and his thoughts on its future. In the interview he also reflected on hi

                                        Interview with Ryan Dahl, Node.js & Deno creator by Evrone
                                      • Prototyping in Rust | corrode Rust Consulting

                                        Programming is an iterative process - as much as we would like to come up with the perfect solution from the start, it rarely works that way. Good programs often start as quick prototypes. The bad ones stay prototypes, but the best ones evolve into production code. Whether you’re writing games, CLI tools, or designing library APIs, prototyping helps tremendously in finding the best approach before

                                          Prototyping in Rust | corrode Rust Consulting
                                        • 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
                                          • 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
                                            • Things we learned about LLMs in 2024

                                              31st December 2024 A lot has happened in the world of Large Language Models over the course of 2024. Here’s a review of things we figured out about the field in the past twelve months, plus my attempt at identifying key themes and pivotal moments. This is a sequel to my review of 2023. In this article: The GPT-4 barrier was comprehensively broken Some of those GPT-4 models run on my laptop LLM pri

                                                Things we learned about LLMs in 2024
                                              • Optimizing your LLM in production

                                                Note: This blog post is also available as a documentation page on Transformers. Large Language Models (LLMs) such as GPT3/4, Falcon, and LLama are rapidly advancing in their ability to tackle human-centric tasks, establishing themselves as essential tools in modern knowledge-based industries. Deploying these models in real-world tasks remains challenging, however: To exhibit near-human text unders

                                                  Optimizing your LLM in production
                                                • API Tokens: A Tedious Survey

                                                  API Tokens: A Tedious Survey Author Name Thomas Ptacek @tqbf @tqbf Image by Annie Ruygt We’re Fly.io. This post isn’t about Fly.io, but you have to hear about us anyways, because my blog, my rules. Our users ship us Docker containers and we transmute them into Firecracker microvms, which we host on our own hardware around the world. With a working Dockerfile, getting up and running will take you l

                                                    API Tokens: A Tedious Survey
                                                  • The Legends of Runeterra CI/CD Pipeline

                                                    The Legends of Runeterra CI/CD Pipeline Hi, I’m Guy Kisel, and I’m a software engineer on Legends of Runeterra’s Production Engineering: Shared Tools, Automation, and Build team (PE:STAB for short). My team is responsible for solving cross-team shared client technology issues and increasing development efficiency. We focus on the areas that empower other teams to do more and protect the team from

                                                      The Legends of Runeterra CI/CD Pipeline
                                                    • High throughput Fizz Buzz

                                                      Fizz Buzz is a common challenge given during interviews. The challenge goes something like this: Write a program that prints the numbers from 1 to n. If a number is divisible by 3, write Fizz instead. If a number is divisible by 5, write Buzz instead. However, if the number is divisible by both 3 and 5, write FizzBuzz instead. The goal of this question is to write a FizzBuzz implementation that go

                                                        High throughput Fizz Buzz
                                                      • Front-end maximalism

                                                        Here's a question that comes up all the time: Q: I have a front end that calls into a back end. It needs to do things now, and might need to do more things later. How much filtering and preprocessing should the back-end do before it passes the data to the front end? And here's an answer I like: A: As little as possible. Some examples: Suppose you have a product page with a long list of products. T

                                                          Front-end maximalism
                                                        • Gamedev in Lisp. Part 1: ECS and Metalinguistic Abstraction - cl-fast-ecs by Andrew

                                                          Gamedev in Lisp. Part 1: ECS and Metalinguistic Abstraction In this series of tutorials, we will delve into creating simple 2D games in Common Lisp. The result of the first part will be a development environment setup and a basic simulation displaying a 2D scene with a large number of physical objects. It is assumed that the reader is familiar with some high-level programming language, has a gener

                                                            Gamedev in Lisp. Part 1: ECS and Metalinguistic Abstraction - cl-fast-ecs by Andrew
                                                          • 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)
                                                            • Cheating is All You Need | Sourcegraph Blog

                                                              Heya. Sorry for not writing for so long. I’ll make up for it with 3000 pages here. I’m just hopping right now. That’s kinda the only way to get me to blog anymore. I’ve rewritten this post so many times. It’s about AI. But AI is changing so fast that the post is out of date within a few days. So screw it. I’m busting this version out in one sitting. (Spoiler alert: There’s some Sourcegraph stuff a

                                                                Cheating is All You Need | Sourcegraph Blog
                                                              • 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
                                                                • The Best AI Coding Tools in 2025

                                                                  What used to take an entire development sprint now ships in a single afternoon. The numbers prove it: according to Stack Overflow's 2024 Developer Survey of over 65,000 developers, 76% are now using or planning to use AI coding assistants in their development process—up from 70% the previous year. The shift from "AI is a novelty" to "AI is how developers code" happened faster than anyone predicted

                                                                    The Best AI Coding Tools in 2025
                                                                  • 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

                                                                    • CohereLabs/c4ai-command-r-plus · Hugging Face

                                                                      ","chat_template":[{"name":"default","template":"{{ bos_token }}{% if messages[0]['role'] == 'system' %}{% set loop_messages = messages[1:] %}{% set system_message = messages[0]['content'] %}{% elif false == true %}{% set loop_messages = messages %}{% set system_message = 'You are Command-R, a brilliant, sophisticated, AI-assistant trained to assist human users by providing thorough responses. You

                                                                        CohereLabs/c4ai-command-r-plus · Hugging Face
                                                                      • Harden-Runner detection: tj-actions/changed-files action is compromised - StepSecurity

                                                                        IntroductionWe have concluded our investigation into the critical security incident involving the `tj-actions/changed-files` GitHub Action. The issue has been reported to GitHub, and an official CVE — CVE-2025-30066 — has been published to track the incident. You can find more details in GitHub Issue #2463. Based on our findings, the Action was compromised and posed a significant risk by exposing

                                                                          Harden-Runner detection: tj-actions/changed-files action is compromised - StepSecurity
                                                                        • Agent Development Kit: Making it easy to build multi-agent applications- Google Developers Blog

                                                                          Agent Development Kit: Making it easy to build multi-agent applications The world of AI is rapidly moving beyond single-purpose models towards intelligent, autonomous multi-agent systems. Building these multi-agent systems, however, presents new challenges. That is why today, we have introduced Agent Development Kit (ADK) at Google Cloud NEXT 2025, a new open-source framework from Google designed

                                                                            Agent Development Kit: Making it easy to build multi-agent applications- Google Developers Blog
                                                                          • syntaxdesign

                                                                            One of the most recognizable features of a languages is its syntax. What are some of the things about syntax that matter? What questions might you ask if you were creating a syntax for your own language? Motivation A programming language gives us a way structure our thoughts. Each program, has a kind of internal structure, for example: How can we capture this structure? One way is directly, via pi

                                                                            • Recto — a truly 2D language

                                                                              Masato Hagiwara Open in Recto Pad Google Colab Github Recto Pad TL;DR Recto is a 2D programming language that uses nested rectangles as its core syntax, encoding structure and recursion directly in space instead of a linear stream of text. Recto explores new ways to write, parse, and reason about code—and even natural language—spatially. Introduction Open in Recto Pad Virtually all the languages w

                                                                                Recto — a truly 2D language
                                                                              • The Ultimate Guide to Error Handling in Python

                                                                                I often come across developers who know the mechanics of Python error handling well, yet when I review their code I find it to be far from good. Exceptions in Python is one of those areas that have a surface layer that most people know, and a deeper, almost secret one that a lot of developers don't even know exists. If you want to test yourself on this topic, see if you can answer the following qu

                                                                                  The Ultimate Guide to Error Handling in Python
                                                                                • What do I think about Lua after shipping a project with 60,000 lines of code?

                                                                                  Hi there! This is Oleg from Luden.io. We decided to have a deep and meaningful conversation about Lua programming language with Ivan Trusov, lead programmer of the video game Craftomation 101. It contains ~60,000 lines of Lua code and is made with Defold game engine. I asked Ivan to talk about the real issues and show real code, not the “hypothetical code, carefully prepared for the public to illu

                                                                                    What do I think about Lua after shipping a project with 60,000 lines of code?