並び順

ブックマーク数

期間指定

  • から
  • まで

1 - 40 件 / 40件

新着順 人気順

python for in list of tuplesの検索結果1 - 40 件 / 40件

  • Writing Python like it’s Rust

    You can check out a YouTube recording of a talk based on this blog post. I started programming in Rust several years ago, and it has gradually changed the way I design programs in other programming languages, most notably in Python. Before I started using Rust, I was usually writing Python code in a very dynamic and type-loose way, without type hints, passing and returning dictionaries everywhere,

    • 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

      • Embedding Model を用いたキーフレーズ抽出の検証といろんな Embedding Model の比較 - ABEJA Tech Blog

        こんにちは!ABEJAでデータサイエンティストをしている藤原です。ABEJAアドベントカレンダー2024 の11日目のブログになります! キーフレーズ抽出を簡単に試すという機会がよくあるのですが、簡単に検証する範囲だといつも同じツール・モデルを使っているため、他の方法でも上手くキーフレーズ抽出ができないか?ということで今回いくつか検証してみました。やることとしては、まず Embedding Model を使って日本語の長めの文章からキーフレーズを上手く抽出できるか?というのを検証します。その上で、色々な Embedding Model 間で抽出されるフレーズがどのように違うか?も比較してみます。 目次 目次 はじめに キーワード抽出・キーフレーズ抽出とは? キーフレーズ抽出の手法 1. グラフベース・統計ベース 2. LLM ベースのアプローチ 3. Embedding ベースのアプローチ

          Embedding Model を用いたキーフレーズ抽出の検証といろんな Embedding Model の比較 - ABEJA Tech Blog
        • 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
          • 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
            • Xilem: an architecture for UI in Rust

              Rust is an appealing language for building user interfaces for a variety of reasons, especially the promise of delivering both performance and safety. However, finding a good architecture is challenging. Architectures that work well in other languages generally don’t adapt well to Rust, mostly because they rely on shared mutable state and that is not idiomatic Rust, to put it mildly. It is sometim

              • 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
                • 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
                  • 14 Advanced Python Features

                    Python is one of the most widely adopted programming languages in the world. Yet, because of it’s ease and simplicity to just “get something working”, it’s also one of the most underappreciated. If you search for Top 10 Advanced Python Tricks on Google or any other search engine, you’ll find tons of blogs or LinkedIn articles going over trivial (but still useful) things like generators or tuples.

                    • htmy

                      Source code: https://github.com/volfpeter/htmy Documentation and examples: https://volfpeter.github.io/htmy htmy Async, pure-Python server-side rendering engine. Unleash your creativity with the full power and Python, without the hassle of learning a new templating language or dealing with its limitations! Key features Async-first, to let you make the best use of modern async tools. Powerful, Reac

                      • LLM Powered Autonomous Agents

                        Date: June 23, 2023 | Estimated Reading Time: 31 min | Author: Lilian Weng Building agents with LLM (large language model) as its core controller is a cool concept. Several proof-of-concepts demos, such as AutoGPT, GPT-Engineer and BabyAGI, serve as inspiring examples. The potentiality of LLM extends beyond generating well-written copies, stories, essays and programs; it can be framed as a powerfu

                        • 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

                          • Announcing TypeScript 5.2 Beta - TypeScript

                            Today we are excited to announce the availability of TypeScript 5.2 Beta. To get started using the beta, you can get it through NuGet, or through npm with the following command: npm install -D typescript@beta Here’s a quick list of what’s new in TypeScript 5.2! using Declarations and Explicit Resource Management Decorator Metadata Named and Anonymous Tuple Elements Easier Method Usage for Unions o

                              Announcing TypeScript 5.2 Beta - TypeScript
                            • Python業務歴1年目から5年目でコードはこう変わった - Qiita

                              class DBClient: PATH = 'hoge/fuga' @classmethod def insert(cls, recs): for rec in recs: # ここでは仮でprintするだけとする print(f"PATH: {cls.PATH}, name: {rec['name']}, age: {rec['age']}") records = [ {"name": "Taro", "age": 20}, {"name": "Jiro", "age": 18}, {"name": "Saburo", "age": 12} ] DBClient.insert(records) import dataclasses from typing import Final @dataclasses.dataclass class Record: name: str age: i

                                Python業務歴1年目から5年目でコードはこう変わった - Qiita
                              • davepeck.org

                                Template strings, also known as t-strings, have been officially accepted as a feature in Python 3.14, which will ship in late 2025. 🎉 I'm excited; t-strings open the door to safer more flexible string processing in Python. What's the big idea with t-strings? Since they were introduced in Python 3.6, f-strings have become a very popular way to format strings. They are concise, readable, and powerf

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

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

                                  • A 2025 Survey of Rust GUI Libraries

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

                                    • Talk: Introducing Ghostty and Some Useful Zig Patterns

                                      This is the text format of a talk I did for Zig Showtime. If you'd rather watch the video, you can find it on YouTube: Zig Showtime: Ghostty. The video also includes a Q&A session at the end which I did not include in this post. Hello! I'm excited to talk today about Ghostty. Ghostty is a brand new terminal emulator written from scratch in Zig. Note: at the time of writing this, Ghostty is still n

                                      • Object-oriented Programming in Python

                                        You must know the power of Object-oriented programming if you have ever worked with object-oriented languages like Java, C#, and much more. Python also supports object-oriented programming, and we can define a class in Python. Let’s explore more about how to achieve this in Python. In the post Getting Started with Python, I have covered the essentials required before becoming a data scientist. In

                                          Object-oriented Programming in Python
                                        • Practical SQL for Data Analysis

                                          Pandas is a very popular tool for data analysis. It comes built-in with many useful features, it's battle tested and widely accepted. However, pandas is not always the best tool for the job. SQL databases have been around since the 1970s. Some of the smartest people in the world worked on making it easy to slice, dice, fetch and manipulate data quickly and efficiently. SQL databases have come such

                                            Practical SQL for Data Analysis
                                          • A from-scratch tour of Bitcoin in Python

                                            I find blockchain fascinating because it extends open source software development to open source + state. This seems to be a genuine/exciting innovation in computing paradigms; We don’t just get to share code, we get to share a running computer, and anyone anywhere can use it in an open and permissionless manner. The seeds of this revolution arguably began with Bitcoin, so I became curious to dril

                                            • A Review of Nim 2: The Good & Bad with Example Code

                                              I've been using Nim for about 1-2 years now, and I believe the language is undervalued. It's not perfect, of course, but it's pleasant to write and read. My personal website uses Nim. After reading a recent article on Nim ("Why Nim") and the associated HN comments, it's clear that comments and some information about Nim are misleading and outdated. Since Nim 2, a tracing Garbage Collector is not t

                                              • Rendering Moana with Swift

                                                Moana (2048×858 pixels, 64 spp) rendered with Gonzales on a Google Cloud Instance with 8 vCPUs and 64GB of memory in roughly 26 hours. Memory usage is about 60GB. (Denoised with OpenImageDenoise.) TLDR: Render Disney’s Moana scene in less than 10.000 lines of Swift code. After Walt Disney Animation Studios released the scene description of the island in Moana some efforts were started to render it

                                                  Rendering Moana with Swift
                                                • 26 languages in 25 days: Strategy, tactics, logistics

                                                  26 programming languages in 25 days, Part 1: Strategy, tactics and logistics Since making a sudden leap from computer science to academic medicine about seven years ago, I haven’t programmed as much. I love what I do in medicine and biology, and I love helping patients. But, I have missed programming – and programming languages. Then I came across the Advent of Code on Mastodon – a series of daily

                                                  • Python業務歴1年目から5年目でコードはこう変わった - Qiita

                                                    class DBClient: PATH = 'hoge/fuga' @classmethod def insert(cls, recs): for rec in recs: # ここでは仮でprintするだけとする print(f"PATH: {cls.PATH}, name: {rec['name']}, age: {rec['age']}") records = [ {"name": "Taro", "age": 20}, {"name": "Jiro", "age": 18}, {"name": "Saburo", "age": 12} ] DBClient.insert(records) import dataclasses from typing import Final @dataclasses.dataclass class Record: name: str age: i

                                                      Python業務歴1年目から5年目でコードはこう変わった - Qiita
                                                    • 7 Things I've learned building a modern TUI Framework

                                                      7 Things I've learned building a modern TUI Framework I've be working on Textual for over a year now. Here's a few things I've discovered (or re-discovered) regarding terminals in Python, and software development in general. I've be working on Textual for over a year now. Here's a few things I've discovered (or re-discovered) regarding terminals in Python, and software development in general. — Wi

                                                      • Simon Peyton Jones

                                                        Recorded 2022-02-01. Published 2022-03-25. Simon Peyton Jones is interviewed by Andres Löh and Joachim Breitner. Simon is the creator of Haskell and in this episode he talks about his new position at Epic, the origins of Haskell and why “it feels right”, and the (extra)ordinary Haskell programmers. Andres Löh: Hello Simon. Thank you so much for joining us today. Simon Peyton Jones: Hi Andres, hi J

                                                        • How to Get or Create in PostgreSQL

                                                          "Get or create" is a very common operation for syncing data in the database, but implementing it correctly may be trickier than you may expect. If you ever had to implement it in a real system with real-life load, you may have overlooked potential race conditions, concurrency issues and even bloat! In this article I explore ways to "get ot create" in PostgresSQL. Illustration by Abstrakt Design Ta

                                                            How to Get or Create in PostgreSQL
                                                          • Python behind the scenes #12: how async/await works in Python

                                                            Mark functions as async. Call them with await. All of a sudden, your program becomes asynchronous – it can do useful things while it waits for other things, such as I/O operations, to complete. Code written in the async/await style looks like regular synchronous code but works very differently. To understand how it works, one should be familiar with many non-trivial concepts including concurrency,

                                                            • Home | marcel

                                                              Marcel is a shell. The main idea is to rely on piping as the primary means of composition, as with any Unix or Linux shell. However, instead of passing strings from one command to the next, marcel passes Python values: builtin types such as lists, tuples, strings, and numbers; but also objects representing files and processes. A pipe carries streams of these values between ccommands. ​ Example: Fi

                                                              • A History of Clojure

                                                                71 A History of Clojure RICH HICKEY, Cognitect, Inc., USA Shepherd: Mira Mezini, Technische Universität Darmstadt, Germany Clojure was designed to be a general-purpose, practical functional language, suitable for use by professionals wherever its host language, e.g., Java, would be. Initially designed in 2005 and released in 2007, Clojure is a dialect of Lisp, but is not a direct descendant of any

                                                                • Pythonのテストフレームワークpytestを使ってみよう - PythonOsaka

                                                                  pytestについて Pythonを使ってテストコードを書くことができるオープンソースのテストフレームワークです。シンプルな単体テストから複雑な機能テストまで、様々なテストを書くことができます。 pytest には次のような特徴があります。 unittest テストケースの実行をサポート 組み込みの assert 文をサポート。特別なアサーション・メソッド(self.assert*())は不要 テストケースのフィルタリングをサポート 最後に失敗したテストから再実行する機能 並行でのテスト実行をサポート 機能を拡張するための何百ものプラグインからなるエコシステム オープンソース pytest は Python 標準の unittest モジュールに代わるボイラープレート不要のモジュールで、unittest テストケースをそのまま実行することができます。pytest はフル機能を備えた拡張可能

                                                                    Pythonのテストフレームワークpytestを使ってみよう - PythonOsaka
                                                                  • Autotools: a tutorial

                                                                    Embedded Linux Conference 2016 GNU Autotools: a tutorial Free Electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com 1/99 Thomas Petazzoni I CTO and Embedded Linux engineer at Free Electrons I Embedded Linux specialists. I Development, consulting and training. I http://free-electrons.com I Contributions I Kernel support fo

                                                                    • Why F#?

                                                                      Hacker. Emacs fanatic. Lover of parentheses. Firebrand. Just another programmer with too many opinions. I’m not the best, but I’m pretty good. If someone had told me a few months ago I’d be playing with .NET again after a 15+ years hiatus I probably would have laughed at this.1 Early on in my career I played with .NET and Java, and even though .NET had done some things better than Java (as it had

                                                                        Why F#?
                                                                      • Python Interview Questions

                                                                        Here is a list of common Python interview questions with detailed answers to help you prepare for the interview as a Python developer. Python, with its versatile use cases and straightforward syntax, has seen its popularity growing continuously in software development, data science, artificial intelligence, and many other fields. As such, interviews for Python-related positions are designed not on

                                                                          Python Interview Questions
                                                                        • Deciphering Glyph :: You Should Compile Your Python And Here’s Why

                                                                          write Python that’s faster than C by optimizing your code, adding standard type annotations, and using Mypyc. In this post I’d like to convince you that you should be running Mypyc over your code1 — especially if your code is a library you upload to PyPI — for both your own benefit and that of the Python ecosystem at large. But first, let me give you some background. Python is Slow, And That’s Fin

                                                                          • Timsort — the fastest sorting algorithm you’ve never heard of

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

                                                                              Timsort — the fastest sorting algorithm you’ve never heard of
                                                                            • Python Projects with Source Code | Aman Kharwal

                                                                              Python is one of the best programming languages. Due to its readability and beginner-friendly nature, it has been accepted by industries around the world. So to master Python for any field you have to work on projects. In this article, I will introduce you to 100+ amazing Python projects with source code solved and explained for free. Python Projects with Source Code Python Projects For Beginners:

                                                                                Python Projects with Source Code | Aman Kharwal
                                                                              • How to build a plugin system in Rust

                                                                                How to build a plugin system in RustMay 29, 2024Software used by businesses often needs to be extensible. For Arroyo, a real-time SQL engine, that means supporting user-defined functions (UDFs). But how can we support dynamic, user-written code in a static language like Rust? This post dives deep into the technical details of building a dynamically-linked, FFI-based plugin system in Rust. Arroyo i

                                                                                  How to build a plugin system in Rust
                                                                                • Using Python to Simplify Data Operations in Data Science

                                                                                  In Data Science, we primarily use Python as a programming language to perform operations on the available datasets. This article will discuss concepts and details for using Pythons to simplify data operations in data science. Pros and Cons of Python for Data OperationsEven though the pros outweigh the cons, it is crucial to look at both aspects. So, let’s have a look at the advantages and limitati

                                                                                    Using Python to Simplify Data Operations in Data Science
                                                                                  1