There is an area of Python that many developers have problems with. This is an area that has seen many different solutions pop up over the years, with many different opinions, wars, and attempts to solve it. Many have complained about the packaging ecosystem and tools making their lives harder. Many beginners are confused about virtual environments. But does it have to be this way? Are the current
Python's formatted strings, or "f-strings", came relatively late to the language, but have become a popular feature. F-strings allow a compact representation for the common task of interpolating program data into strings, often in order to output them in some fashion. Some restrictions were placed on f-strings to simplify the implementation of them, but those restrictions are not really needed any
はじめに 2022年も終わりますね。 今年は点群処理が網羅的に解説された本が出たり、テキストから点群生成できるAIが出てきたり、いろいろ点群界隈も盛り上がっていたかと思います。 そんな正統派点群技術が盛り上がった年の最後に、闇の点群技術を紹介できればと思います。 Pythonワンライナーの世界 Pythonワンライナーとは、普通に書くと数行に渡りそうな処理をワンライナー(一行)で書くことで、ただただ自己満足・自己顕示欲のためだけに難解なコードを作成するアレなテクニックです。 この記事では一般的なPythonワンライナーコードではなく、点群処理に特化したアルゴリズムのワンライナーを紹介していきたいと思います。 前提条件 まず、本記事のテクニックではnumpyおよびscipyのみライブラリとして使用することを許可しています。 Open3Dまで使ってしまうと闇どころか完全なチートになってしまうの
Signed distance functions are a really cool method of 3D rendering! But they unfortunately have a reputation for being difficult to understand. It makes sense why—they usually get shown off in beautiful, but complicated ShaderToy examples written in GLSL, an unfamiliar language for most programmers1. But at their core, SDFs are a really simple idea. I'm going to prove that by walking you through a
Boring Python: code quality December 19, 2022 Django, Python This is the second in a series of posts I intend to write about how to build, deploy, and manage Python applications in as boring a way as possible. In the first post in the series I gave a definition of what I mean by “boring”, and it’s worth revisiting: I don’t mean “reliable” or “bug-free” or “no incidents”. While there is some overla
So, there's this website, Have I Been Pwned, where you can check if your email address has appeared in a data breach. There's also a Pwned Passwords section for passwords ... but, typing your password on a random website probably isn't such a great idea, right? Of course, you could read about how HIBP protects the privacy of searched passwords, and understand how k-Anonymity works, and check that
This is the page accompanying my youtube channel Ten Minute Physics. In short episodes of about ten minutes I explain the basic concepts of physically based simulation. Each time I write a little javascript demo that runs in any browswer. Youtube Contributions Back Tutorials Many more to come - stay tuned! In this tutorial I explain how to simulate joints using the extended position based dynamics
まとめ Pythonから巨大なテキストファイルを並列に読み込み・処理・書き込みする方法を紹介 読み込み: テキストファイルをバイト列として見て、プロセスごとにファイルの読み込み区間を割り振る 処理: multiprocessingを用いた並列処理 書き込み: プロセスごとにtmpファイルへ並列に書き込み & catによる結合 はじめに 日本語形態素解析器であるMeCabを用いると、日本語のテキストに対する解析や処理が簡単に実行できます。 特に最近は、BERTをはじめとする深層学習モデルへの入力のための前処理として、MeCabなどを用いて文を単語単位に分割する「分かち書き」を行う機会が多くなっています。 MeCabはコマンドラインから実行することもできますし、Pythonなどからプログラム的に呼び出すことも可能です。 特にコマンドラインから実行する場合は、インストールさえ終わっていれば以下の
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く