Python早見帳は、プログラムと実行例をカタログ的に提示しながら、Pythonの言語仕様やライブラリを紹介しています。Pythonの基礎を素早く習得したり、ライブラリやオブジェクトの使い方を確認することができます。
序文 私の仕事は、DBエンジニアです。といっても別に望んでデータベースの世界へきたわけではなく、当初、私はこの分野が面白くありませんでした。「Web系は花形、データベースは日陰」という言葉も囁かれていました。今でも囁かれているかもしれません。 ですが、しばらくデータベースを触っているうちに、私はこの世界にとても興味深いテーマが多くあることを知りました。なぜもっと早く気づかなかったのか、後悔することしきりです。 もちろん、自分の不明が最大の原因ですが、この世界に足を踏み入れた当時、先生も、導きの書となる入門書もなかったことも事実です。 今でこそバイブルと仰ぐ『プログラマのためのSQL 第2版』も新入社員には敷居が高すぎました (2015年2月追記:その後、自分で第4版を訳出できたのだから、 人生は何があるか分からないものです)。 そこで、です。このサイトの目的は、データベースの世界に足を踏み
お近づきになりたい人向けシリーズです。 いろいろなトピックを詰め込みましたが、「これら全部を知らないといけない」のようなつもりではなく、いろいろなことを知るきっかけになったらいいなという気持ちなので、あまり身構えずにちょっとずつ読んでもらえたらうれしい気がします。 まえがき 予備知識 規格 用語 精度という語について 記法 表現について 有限値の表現について エンコードについて 丸めについて よくある誤差や勘違いの例 0.1 = 1 / 10? 0.1 + 0.2 = 0.3? 整数の誤差 Rump’s Example 基本的な誤差評価 用語に関して 実数の丸め 有理数の丸め 基本演算の丸め 差について 複数回の演算 補題たち 桁落ちについて Re: Rump’s example 融合積和 数学関数に関する式の計算 誤差の削減に関して 総和計算 数学関数の精度について 比較演算について 雑
OpenCVを使用して画像から複数のオブジェクトを認識し、切り出すための一般的な手順は以下のようになります: 前処理: 画像を読み込みます。必要に応じて画像をリサイズします。グレースケールに変換するか、あるいは必要に応じて色空間を変更します。オブジェクトの検出: エッジ検出、閾値処理、または色に基づくフィルタリングなどを使用してオブジェクトを検出します。輪郭検出を行い、オブジェクトの境界を見つけます。輪郭の処理: 検出された輪郭をフィルタリングして、ノイズや小さなオブジェクトを除去します。必要に応じて輪郭を近似します。オブジェクトの切り出し: 各オブジェクトの境界ボックスを使用して画像からオブジェクトを切り出します。オブジェクトごとに個別の画像として保存するか、表示します。後処理 (オプション): 切り出されたオブジェクトをさらに処理するためのステップを行います。例えば、オブジェクトのサイ
米ハーバード大学がオンラインで無料公開している、PythonやJavaScriptのプログラミング学習とコンピューターサイエンスの入門講座の日本語訳ページ「CS50.jp」が無償公開されました。2022年8月31日に2022年度最新版の日本語化が完了しました。講義動画の日本語字幕の翻訳化を順次すすめています。学生向けですが、年代にかかわらず、コロナ禍で学習環境やキャリアに悩んでいる誰もが学ぶことができます。 ハーバード大学のCS50xとは ハーバード大学のCS50xとは、日本語翻訳ページ「CS50.jp」によると、コンピューターサイエンスとプログラミング技術を紹介するオンラインコースです。この講義がオンライン上で無償公開されており、世界で282万人が履修登録しています。 edX - CS50s Introduction to Computer Science 学べる内容はPythonのプロ
PythonだってGUIを作りたい Pythonで書いたプログラムを実行して使う場合、**『GUIで入出力できたら便利なのに…』**と思うときはありませんか? 誰かにプログラムを配布する場合でも、CUI(コマンドラインから入出力)はあまり親切とは言えません。 特にITスキルの高くない人にとっては、CUIは拒絶反応を起こすこともあります。 Pythonでも簡単にGUIを作れたら… そんな場合、PySimpleGuiを使ってみてはいかがでしょうか? PySimpleGuiは誰でも簡単にGUIを実装できるのが特徴で、PySimpleGui公式ドキュメントによると、PySimpleGuiはすぐに習得でき、コード量も他のGUIライブラリ(Tkinter、Qt、WxPythonなど)の1/2~1/10程度で済むとのこと。 百聞は一見にしかずなので、まずは下記のコードと実行結果をご覧ください。 impo
はじめに 2020年7月、Plotly 4.8.2 時点の情報で全面的に書き直しました。 Pythonから利用できるライブラリ、Plotlyの初歩的な使い方、とりわけ特に頻繁に用いる折れ線グラフ(散布図)の作り方を記述します。Plotlyを用いると、下図に示すようにぐりぐり動かせるグラフを作ることができます。 この記事では扱っていませんが、Plotlyは、折れ線グラフ以外にも様々な種類のグラフを描くことができます。また、Plotly ExpressというPlotlyの高レベルのAPIや、DashというPlotlyを用いたWebアプリケーションフレームワークもあります(例)。 令和時代のPython作図ライブラリのデファクトスタンダードPlotlyExpressの基本的な描き方まとめ 可視化ツールDashのチュートリアル - Part1: インストール~描画 - インストール pip ins
動機 いわずもがなですが、機械学習の勉強にはとても時間が掛かります。 でも、同じ勉強時間を費やしたとしても、教材の良し悪しで捗り方が大きく変わってくることは、誰もが実感していることだと思います。 そこで、本記事ではテーマごとに私が考える最強の教科書をリストしていこうと思います。 ディープラーニング(アルゴリズムの理解) 「Deep Learning」An MIT Press book, 2016/12 発行 http://www.deeplearningbook.org/ 印刷本も売られてますが、上のWebページでいつでもタダで読めます。(版権上の問題でPDFの形では配布できない&してないそうです) この本は、ここ数年のディープラーニングの進歩のうち研究者の間ではメジャーとなっているであろうテーマはすべて書いてある、ともいえる内容の広さがありつつ、それぞれのテーマについて理論的背景と具体的
Python ヒッチハイク・ガイド¶ Python ヒッチハイク・ガイド へようこそ。 これは皆さんの手により生きているガイドです。 貢献したい方は GitHub で fork してください! この手作りガイドは、初心者と熟練者のPython開発者の両方に、Python のインストール、設定、および使用に関するベスト・プラクティスを日々提供するために存在します。 このガイドは、ほとんど 独断的なもの であり、Python の公式文書では ありません 。 ここでは、すべての Python Webフレームワーク の一覧は見つからないでしょうが、強く推奨されているリストが簡潔に見つかるでしょう。 さあ、始めましょう! まずは、あなたの探しものがどこにあるかを確認しましょう。
オープンソースプロジェクトに参加したいな、と思った時、まず最初に問題だと感じるのは英語だと思う。構成員が日本人だけで、日本人に向けてのみ出しているそソフトウェアでない限り、プロジェクトの共通語はふつう英語だ。植山さんの記事には英語で物事を進めることの利点が体験談とともに書かれている。他の記事にも、オープンソースプロジェクトで上手いことやっていくためのひとつとして英語の話が出てくる。一方、英語のせいで参加したくても二の足を踏んでしまう、というのもよく聞く話だ。結論から言ってしまうと、やっぱり読み書きだけでも習得しないと話に入っていくのは難しい。ソフトウェア開発者の多くは多様性に対して寛容なので、英語が不得意という理由で拒絶されることはないだろう。ただ、特別な配慮もしてくれない。 しかし英語の前に、プロジェクトとの距離のとりかたを学ぶべきだと思う。いままでわたしが見てきたり、自分自身がやって良
Perlプログラミングを学びたい人向けのPerl入門講座です。 Perlはテキスト処理に最適化されたプログラミング言語です。Linuxシステム管理、Web開発という分野でも大活躍。後方互換性、ライブラリの安定性、数多くのOSサポートに定評があります。 Perl入門 PerlのインストールPerlのインストール方法を解説。Windows、macOS、Unix/Linux対応。 基礎文法最速マスターPerlプログラムの基本のすべて 文字列処理Perlは文字列処理が得意。文字列の連結や文字列関数などを解説 if文による条件分岐if、elsif、elseの条件分岐の構文をマスターすれば、条件で処理を変えるPerlプログラムが書ける。 for文、while文による繰り返しfor文、while文と繰り返し構文を覚えれば、Perlで繰り返し実行する処理が書けるようになります。 正規表現正規表現を覚えると
俺の半生大学の一般教養でPascalを習った程度。専門課程に入る前に文法はすっかり忘れた。専攻は都市工学だからその後プログラミングとは縁はなかった。卒業前に第一種情報処理技術者の資格だけはとれてたのでプログラミングの何たるかとかオブジェクト指向なんかも知識としては知ってた。 大学卒業後にデスクトップユーティリティーのメーカーで技術営業をやった。顧客に製品仕様を説明するのが主な仕事なのでパワポばかり使ってた。その会社ではLinuxのソフトも販売してたから、Linuxのコマンドは打てるようになった。そこでシェルスクリプトを習得しようと思ったがあえなく挫折。 その後ネットワーク機器のメーカーに転職。トラブルシューティングでLinuxをさらに使うようになった。そこではHTTPプロキシを主に扱っていたので、HTTPプロトコルについては一通り知識を身につけた。その知識を実際にLinux上でシミュレーシ
@hirose31 さんが「シェルスクリプトでハマった件→【募】ステキな回避方法」でお題を出されていて、それに回答してみました。 その内容はリンク先を見てもらうとして、回答の中で使ったbashのプロセス置換について書かれた記事をあまり見ないので、回答で使ったプロセス置換のことをエントリにしてみたいと思います。 最初に注意点ですが、プロセス置換の機能は、bashやzsh*1の機能でPOSIX互換の機能ではありません。そのため、使用時には、対応していないシェルでは使えませんし、bashで使う場合も /bin/sh ではなく /bin/bash を明示的に指定する必要があります。たとえば、プロセス置換を使ったスクリプト「script.sh」に対して"$ bash script.sh" というコマンドは成功しますが、"$ sh script.sh" というコマンドは失敗します。この辺りの違いは「/
当サイトは、UNIX/Linuxにてよく使用されるコマンド/ツールの使用例や言語の入門やコード事例を掲載しております。 深い理解は求めずに、手っ取り早く使えるように、使用例(サンプル)を中心にしています。 情報の正確さには注意を払っておりますが、誤りや適切でない記述を掲載してしまうかもしれません。 当サイトの情報をご利用いただく際は、どうか、ご自身で十分検証を行ってください。 なお、当サイトのをご利用になられて発生した損害については、当方は一切責任を負いかねますので、あらかじめご了承願います。 また、掲載内容についてのご質問はご遠慮願います。
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く