並び順

ブックマーク数

期間指定

  • から
  • まで

1 - 40 件 / 48件

新着順 人気順

python convert string to int if not noneの検索結果1 - 40 件 / 48件

  • 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
    • 【2020年】CTF Web問題の攻撃手法まとめ - こんとろーるしーこんとろーるぶい

      はじめに 対象イベント 読み方、使い方 Remote Code Execution(RCE) 親ディレクトリ指定によるopen_basedirのバイパス PHP-FPMのTCPソケット接続によるopen_basedirとdisable_functionsのバイパス JavaのRuntime.execでシェルを実行 Cross-Site Scripting(XSS) nginx環境でHTTPステータスコードが操作できる場合にCSPヘッダーを無効化 GoogleのClosureLibraryサニタイザーのXSS脆弱性 WebのProxy機能を介したService Workerの登録 括弧を使わないXSS /記号を使用せずに遷移先URLを指定 SOME(Same Origin Method Execution)を利用してdocument.writeを順次実行 SQL Injection MySQ

        【2020年】CTF Web問題の攻撃手法まとめ - こんとろーるしーこんとろーるぶい
      • 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

        • 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

          • 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
            • 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
              • 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
                • 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
                  • 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

                    • Why I use attrs instead of pydantic

                      This post is an account of why I prefer using the attrs library over Pydantic. I'm writing it since I am often asked this question and I want to have something concrete to link to. This is not meant to be an objective comparison of attrs and Pydantic; I'm not interested in comparing bullet points of features, nor can I be unbiased since I'm a major contributor to attrs (at time of writing, second

                      • python_modules.pdf

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

                        • What's new in Python 3.11?

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

                            What's new in Python 3.11?
                          • Kubeflow PipelinesからVertex Pipelinesへの移行による運用コスト削減 - ZOZO TECH BLOG

                            こんにちは、技術本部 データシステム部 MLOpsブロックの平田(@TrsNium)です。約2年半ぶりの執筆となる今回の記事では、MLOps向け基盤を「Kubeflow Pipelines」から「Vertex Pieplines」へ移行して運用コストを削減した取り組みを紹介します。 目次 目次 はじめに Vertex Pipelinesとは Vertex Pipelinesへの移行 Vertex Pipelinesへ移行するワークフロー 1. ワークフローのKubeflow Pipelines SDK V2への移行 コンパイラのデータ型の制約が厳しくなった ContainerOp APIが非推奨になった Kubeflow PipelinesのPlaceholderを使用できなくなった 2. スケジュール実行されているワークフローへ前回実行分が終わるまでの待機処理を追加 3. Vertex

                              Kubeflow PipelinesからVertex Pipelinesへの移行による運用コスト削減 - ZOZO TECH BLOG
                            • はじめての自然言語処理 Fusion-In-Decoder でクイズに答えるモデルを作る | オブジェクトの広場

                              今回は Fusion-In-Decoder を使ってクイズに答えるモデルを作ります。以前から Wikipedia 等の外部情報を参照できるテキスト生成モデルを試してみたいと思っていました。Fusion-In-Decoder の発表は 2020 年なので少し前のモデルですが、T5 ベースで手軽に試せるサイズ感ですので、日本語で試してみましょう。 1. はじめに 今回紹介する Fusion-In-Decoder(以下、FiD )1 は Meta AI (当時は Facebook AI Research) が発表した Open Domain question Answering タスクを解くテキスト生成モデルです。 じつは、以前から外部情報を参照できるテキスト生成モデルを試してみたくて2、 Google の RETRO3 の論文を読んでたんです。 なのですが、外部情報のサイズ感が 1000 B

                                はじめての自然言語処理 Fusion-In-Decoder でクイズに答えるモデルを作る | オブジェクトの広場
                              • 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
                                • How I wrote my own "proper" programming language

                                  The diagram above is the compiler for the language Bolt we’ll be building. What do all the stages mean? I have to learn OCaml and C++? Wait I haven’t even heard of OCaml… Don’t worry. When I started this project 6 months ago, I had never built a compiler, nor had I used OCaml or C++ in any serious project. I’ll explain everything in due course. In this series of posts we’ll be building a proper pr

                                    How I wrote my own "proper" programming language
                                  • swift-transformers で LLM を動かしてみた - ABEJA Tech Blog

                                    ABEJA でエンジニアをしている石川です。これは ABEJA アドベントカレンダー 2024 の 18 日目の記事です。 CoreML で機械学習モデルを動かす swift-transformers を試す Mistral 7B モデルを動かす swift-transformers で推論を実装する Python で動かしてみる CoreML モデルに変換 Swift で動かす パフォーマンス We Are Hiring! macOS/iOS で機械学習モデルを動かすにはいくつかの方法がありますが、Apple シリコンの能力を十分に引き出すためには CoreML を使うのが最適です。 Python 向け機械学習フレームワークである PyTorch も MPS バックエンドによって、Apple シリコンの GPU を利用することはできます。しかし、Apple の NPU (Neural P

                                      swift-transformers で LLM を動かしてみた - ABEJA Tech Blog
                                    • My thoughts on writing a Minecraft server from scratch (in Bash)

                                      My thoughts on writing a Minecraft server from scratch (in Bash) For the past year or so, I've been thinking about writing a Minecraft server in Bash as a thought excercise. I once tried that before with the Classic protocol (the one from 2009), but I quickly realized there wasn't really a way to properly parse binary data in bash. Take the following code sample: function a() { read -n 2 uwu echo

                                      • ​Getting Started with Python

                                        Python is a powerful programming language that provides many packages that we can use. Using the versatile Python programming language, we can develop the following: AutomationDesktop applicationAndroidWebIoT home automationData Science and the list goes on.In this article, our primary focus will be knowing how to start learning Python and the essentials required to be a data scientist. Below is t

                                          ​Getting Started with Python
                                        • 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

                                          • ChatVectorで新モデル作って評価して遊ぶヤツ、自分もやりたい

                                            最近、一部のローカルLLM勢のあいだでChatVectorで遊ぶのが流行っている。 ChatVectorとは何か?というとこちらの論文で発表された技術だ。 [2310.04799] Chat Vector: A Simple Approach to Equip LLMs with Instruction Following and Model Alignment in New Languages (arxiv.org) こちらの解説記事が分かりやすい。 Chat Vectorを使って日本語LLMをチャットモデルに改造する – Qiita 要するに、ChatVectorとは指示チューニングでチャット能力を獲得したモデルのウエイトから、ベースになったモデルのウエイトを差し引いた差分の事である。 そしてChatVectorを別のモデルのウエイトに加算すれば、そのモデルにチャット能力を付与する事が

                                              ChatVectorで新モデル作って評価して遊ぶヤツ、自分もやりたい
                                            • AWS Glueで複雑な処理を開発するときのTips | フューチャー技術ブログ

                                              はじめにこんにちは。TIGの藤田です。 Python連載 の8日目として、PySparkを使用したGlueジョブ開発のお話をします。 ETLツールとして使用されるAWS Glueですが、業務バッチで行うような複雑な処理も実行できます。また、処理はGlueジョブとして、Apache Spark分散・並列処理のジョブフローに簡単に乗せることができます! 特に複雑な処理は、やや割高な開発エンドポイントは使用せず、ローカル端末で、しっかり開発・テストを行いたいですよね。そのためのローカル開発Tipsをご紹介します。 内容 Glueジョブの開発と実行概要 Tip1: ローカル環境構築 Tip2: PySpark, SparkSQL開発 Tip3: 単体テスト(pytest) Tip4: データカタログどうする問題 Glueジョブの開発と実行概要ローカル開発の前に、AWS Glueでのジョブ実行方法を

                                                AWS Glueで複雑な処理を開発するときのTips | フューチャー技術ブログ
                                              • 【GROMACS】Umbrella samplingによるMD simulation 【In silico創薬】【SMD】 - LabCode

                                                Windows 11 Home, 13th Gen Intel(R) Core(TM) i7-13700, 64 ビット オペレーティング システム、x64 ベース プロセッサ, メモリ:32GB Umbrella Samplingの概要と目的Umbrella Samplingは、分子がめったに起こさないような状態変化(たとえば、タンパク質同士が離れるなど)を詳しく調べるための計算手法です。通常の分子動力学(MD)では、エネルギー的に安定な状態にとどまりやすく、重要な変化が起こる確率が低いため、十分な情報が得られません。 たとえば、タンパク質AとBがくっついている状態から、少しずつ離れていく様子を観察したいとき、まずAとBを少しずつ引き離すSteered Molecular Dynamics(SMD)などのシミュレーションで、さまざまな距離の構造を取得します。その中から、0.5nm、0.7

                                                • PySkyWiFi: completely free, unbelievably stupid wi-fi on long-haul flights | Robert Heaton

                                                  The plane reached 10,000ft. I took out my laptop, planning to peruse the internet and maybe do a little work if I got really desperate. I connected to the in-flight wi-fi and opened my browser. The network login page demanded credit card details. I fumbled for my card, which I eventually discovered had hidden itself inside my passport. As I searched I noticed that the login page was encouraging me

                                                    PySkyWiFi: completely free, unbelievably stupid wi-fi on long-haul flights | Robert Heaton
                                                  • NumPy 2.0.0 Release Notes — NumPy v2.4.dev0 Manual

                                                    Getting started What is NumPy? Installation NumPy quickstart NumPy: the absolute basics for beginners Fundamentals and usage NumPy fundamentals NumPy for MATLAB users NumPy tutorials NumPy how-tos Advanced usage and interoperability Using NumPy C-API F2PY user guide and reference manual Under-the-hood documentation for developers Interoperability with NumPy Extras Glossary Release notes 2.4.0 2.3.

                                                    • Fine-Tune Whisper For Multilingual ASR with 🤗 Transformers

                                                      For demonstration purposes, we'll fine-tune the multilingual version of the small checkpoint with 244M params (~= 1GB). As for our data, we'll train and evaluate our system on a low-resource language taken from the Common Voice dataset. We'll show that with as little as 8 hours of fine-tuning data, we can achieve strong performance in this language. 1{}^11 The name Whisper follows from the acronym

                                                        Fine-Tune Whisper For Multilingual ASR with 🤗 Transformers
                                                      • Agents for Amazon Bedrock now support memory retention and code interpretation (preview) | Amazon Web Services

                                                        AWS News Blog Agents for Amazon Bedrock now support memory retention and code interpretation (preview) With Agents for Amazon Bedrock, generative artificial intelligence (AI) applications can run multistep tasks across different systems and data sources. A couple of months back, we simplified the creation and configuration of agents. Today, we are introducing in preview two new fully managed capab

                                                          Agents for Amazon Bedrock now support memory retention and code interpretation (preview) | Amazon Web Services
                                                        • Type Parameters Proposal

                                                          Ian Lance Taylor Robert Griesemer August 20, 2021 StatusThis is the design for adding generic programming using type parameters to the Go language. This design has been proposed and accepted as a future language change. We currently expect that this change will be available in the Go 1.18 release in early 2022. AbstractWe suggest extending the Go language to add optional type parameters to type an

                                                          • 789 KB Linux Without MMU on RISC-V

                                                            Follow @popovicu94 In this guide, we’ll build a very tiny Linux kernel, weighing in at 789 K, and requiring no MMU support. We’ll write some userspace code and this will be deployed on a virtual RISC-V 64-bit machine, without MMU, and we’ll run some tiny programs of our own. As a reminder, please go through the guide for a micro Linux distro to understand the concepts behind what we’re doing today

                                                              789 KB Linux Without MMU on RISC-V
                                                            • はじめての自然言語処理 Transformer 系モデルの推論高速化の検証 | オブジェクトの広場

                                                              今回は Transformer 系のモデル、具体的には BERT, T5, GPT の推論を高速化してみます。高速化手法として FasterTransformer, Torch-TensorRT, AWS Neuron を用い、素 の transfomers に比べ、どの程度速くなるか(ならないか)、利点・欠点を確認してみましょう。 1. はじめに 今回は Transformer 系のモデル、具体的には BERT, T5, GPT の推論を様々な技術を使って高速化してみます。 高速化の元ネタは Hugging Face の transformers1 縛りとして、素の transformers で推論する場合に比べ、 どの程度速くなるか(ならないか)見てみましょう。 推論を高速化する技術としては FasterTransfomer2, Torch-TensorRT3, AWS Neuron(

                                                                はじめての自然言語処理 Transformer 系モデルの推論高速化の検証 | オブジェクトの広場
                                                              • Plan 9 Desktop Guide

                                                                PLAN 9 DESKTOP GUIDE INDEX What is Plan 9? Limitations and Workarounds Connecting to Other Systems VNC RDP SSH 9P Other methods Porting Applications Emulating other Operating Systems Virtualizing other Operating Systems Basics Window Management Copy Pasting Essential Programs Manipulating Text in the Terminal Acme - The Do It All Application Multiple Workspaces Tiling Windows Plumbing System Admin

                                                                • Large Text Compression Benchmark

                                                                   Large Text Compression Benchmark Matt Mahoney Last update: July 3, 2025. history This competition ranks lossless data compression programs by the compressed size (including the size of the decompression program) of the first 109 bytes of the XML text dump of the English version of Wikipedia on Mar. 3, 2006. About the test data. The goal of this benchmark is not to find the best overall compressi

                                                                  • Range Over Function Types - The Go Programming Language

                                                                    Range over function types is a new language feature in the Go 1.23 release. This blog post will explain why we are adding this new feature, what exactly it is, and how to use it. Why? Since Go 1.18 we’ve had the ability to write new generic container types in Go. For example, let’s consider this very simple Set type, a generic type implemented on top of a map. // Set holds a set of elements. type

                                                                      Range Over Function Types - The Go Programming Language
                                                                    • cuneicode, and the Future of Text in C

                                                                      Following up from the last post, there is a lot more we need to cover. This was intended to be the post where we talk exclusively about benchmarks and numbers. But, I have unfortunately been perfectly taunted and status-locked, like a monster whose “aggro” was pulled by a tank. The reason, of course, is due to a few folks taking issue with my outright dismissal of the C and C++ APIs (and not showi

                                                                        cuneicode, and the Future of Text in C
                                                                      • 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

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

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

                                                                            はじめての自然言語処理 ELECTRA(BERT の事前学習手法の改良)による固有表現抽出の検証 | オブジェクトの広場
                                                                          • JSON is not JSON Across Languages | Dochia CLI Blog

                                                                            Introduction: These Aren’t the JSONs You’re Looking For JSON (JavaScript Object Notation) was designed as a simple, lightweight, and human-readable data interchange format, often positioned as a more accessible alternative to XML. It has become the de facto standard for web APIs and system integration. However, while the specification itself is straightforward, different programming languages and

                                                                              JSON is not JSON Across Languages | Dochia CLI Blog
                                                                            • Reindex, Transform, and Aggregate datasets using pandas Library

                                                                              Most of the time, the dataset we will get from the business will be dirty and cannot be used straight forward to train machine learning models. Therefore, we must treat the dataset and bring it to the desired form to input it into an algorithm. This tutorial discusses reindexing, transforming, and aggregating datasets in Pandas. What are Reindexing, Transforming, and Aggregating?Reindexing, transf

                                                                                Reindex, Transform, and Aggregate datasets using pandas Library
                                                                              • Webスクレイピングで高配当株 スクリーニング自動化ツールを作成した - cojimaru BLOG

                                                                                どうも、こじまるです。 先日から高配当株投資を始めました。毎日株価をスクリーニングツールなどで確認しているのですが、スクリーニングツールで検索条件を設定して検索作業をするのが面倒です。そのため、スクリーニング条件と一致する株価情報を配信してくれるツールを作成しようと思いました。 はじめに 対象読者 この記事を見てわかること スクリーニング条件 調査 プログラムで株の情報を取得する方法 APIの利用 Webスクレイピングの利用 情報取得先 取得ページ・ファイル スクリーニングツール作成 要件定義 環境構築 事前準備 ファイルの連結 実装 東証一部上場の銘柄のコード取得 Webスクレイピング スクリーニング スクリーニング結果 ソースコード まとめ はじめに 対象読者 Webスクレイピングを始めたいと思っている方 高配当株のスクリーニングツールに興味がある方 この記事を見てわかること Webス

                                                                                  Webスクレイピングで高配当株 スクリーニング自動化ツールを作成した - cojimaru BLOG
                                                                                • Metashapeで全天球画像をキューブマップに変換

                                                                                  Metashapeは全天球画像(エクイレクタングラー)の処理に対応していますが、アライメント結果を他のSfM系ソフトで利用する場合は、全天球画像のままでは渡すことが出来ません。 postshot、RealityCapture、Inria 3D Gaussian Splatting等は全天球画像には対応していないためです。 しかし先日smert999氏が「Agisoft_metashape_convert_to_cubemap」を公開されました! Metashapeでアライメントした全天球画像を、そのアライメント結果を維持したままキューブマップに変換できるというものです。 Theta, Insta360等で360度動画/全天球画像撮影 → Metashapeでアライメント → キューブマップ変換 → RealityCaptureで活用・postshotで3DGS生成 といったワークフローが可

                                                                                    Metashapeで全天球画像をキューブマップに変換