Note The Python runtime does not enforce function and variable type annotations. They can be used by third party tools such as type checkers, IDEs, linters, etc. This module provides runtime support for type hints. Consider the function below: def surface_area_of_cube(edge_length: float) -> str: return f"The surface area of the cube is {6 * edge_length ** 2}." The function surface_area_of_cube tak
COLUMN 組み込みエンジニアの戸惑い PythonからC言語を呼び出してみる②(SWIGを使った場合) # Python # エンジニア # 組み込みエンジニアの戸惑いシリーズ Python編 # 言語 2019-11-07 FSI Embedded 組み込みソフトウェアエンジニアがPythonを始めてみました。そして、第6の戸惑い、前回に引き続き組み込みとは切っても切り離せない「C言語」に関しての話題です。Pythonを扱っていて課題となることもある処理速度の改善や、過去資産の流用など、そんなときに役立つかもしれない、PythonからC言語を呼び出す方法についてのご紹介です。 PythonからC言語、またはC++を呼び出す方法には様々なものがあり、前回の記事でご紹介したPython/C API (Python.h)や、今回ご紹介するSWIG、またboost.pythonなどがあります
ctypes — A foreign function library for Python¶ Source code: Lib/ctypes ctypes is a foreign function library for Python. It provides C compatible data types, and allows calling functions in DLLs or shared libraries. It can be used to wrap these libraries in pure Python. ctypes tutorial¶ Note: The code samples in this tutorial use doctest to make sure that they actually work. Since some code sample
📝 Rich Text Formatting Author in reStructuredText or MyST Markdown to create highly structured technical documents, including tables, highlighted code blocks, mathematical notations, and more. 🔗 Powerful Cross-Referencing Create cross-references within your project, and even across different projects. Include references to sections, figures, tables, citations, glossaries, code objects, and more.
Pythonにもプログラミングお作法があります。それは「Pythonic」と「The Zen of Python」になります。Pythonの学習を始める前にご一読いただけると、学習効率が高まると考えております。 なお、当協会は「Pythonic」と「The Zen of Python」を一人でも多くの方に理解してほしいと考え、以下のサイトで無料の検定試験を実施しています。(合格者には認定証が発行されます)興味がある方は以下より受験いただけると幸いです。 PythonZen & PEP 8 検定試験のWebサイトへ プログラミングフィロソフィー「Pythonic」Pythonを使う人たちの間で共有されている造語に「Pythonic」というものがあります。「Pythonic」はプログラミングフィロソフィーに関して幅広い意味を含むことばです。Pythonの素晴らしさを最大限に引き出せるエンジニア
どんなプログラミング言語を習得すれば、年収アップにつながるのか――。コードを書く技術者なら誰もが一度は考えたことのあるテーマだろう。世の中には数百種類のプログラミング言語があり、時代ごとにはやり廃りがある。それでは、現在学んでおくべきプログラミング言語は何だろうか。 その1つの答えになりうるプログラミング言語と年収の関係を示した調査結果が発表された。それが、ビズリーチが公表した「プログラミング言語別年収ランキング2018」だ。 このランキングは、ビズリーチが運営する求人検索エンジン「スタンバイ」に掲載されている正社員の求人情報(約324万件)から、プログラミング言語名が含まれる求人情報の提示年収の中央値を集計したものだ。調査では、1位が「Go」、2位が「Scala」、3位が「Python」という結果だった。 1位のGoは、米グーグル(Google)が開発したプログラミング言語だ。並列処理な
第7回くらいのServo Readingで話したことをざっくりまとめた。誰がどれを話したかはmangleしてあるので御容赦を。 個人的にざっくりとTwitterなどなどをクロールして得た感想だけど、GoはCompiled Pythonともいうべき立ち位置な気がする。PythonとかPerlとかRubyとかシェルスクリプトとか以上C未満な箇所を、JavaやScalaよりももっとスマートに置き換える、そういう意味での「システム」開発言語。 対する?Rustは、カーネルとかブラウザエンジンとかゲームエンジンとか、ハードウェアに近いエリアの計算機資源をがしがしと叩きまくるための言語。C/C++の面倒くさい因習やエクストリームな部分をうまく隠蔽しつつ、時々必要になったらunsafeブロックで例外的に許容する。その安全性の担保として、コンパイラを使った静的チェックをCPUとメモリにものを言わせてブイブ
Pythonの拡張された対話シェルとしてはIPythonが有名ですが、bpythonというのもあります。 Home - the bpython interpreter bpythonはPygmentsを使用して入力中のコードをシンタックスハイライトしたり、入力中に次々と入力候補を表示してくれたり、docstringを表示してくれたりします。 また、入力したコードをファイルに書きだしたり、コード貼り付けサイトに投稿したりすることもできます。 インストールはeasy_installやpipでOK。 $ pip install bpythonPython3にも対応しているし、よくできるなー。 あと略称がbpというのもいい
TIOBE Programming Community index TIOBE Softwareから2011年2月のTIOBE Programming Community Index (PCI)が公開された。TIOBE PCIは複数の検索エンジンの検索結果から対象とするプログラミング言語がどれだけ話題になっているかをインデックス化したもの。2011年2月におけるインデックスは次のとおり。 プログラミング言語 インデックス 年間推移 備考 1 Java 18.482 ↑ 7ヶ月連続1位 2 C 14.986 ↓ 3 C++ 8.187 ↓ 4 Python 7.038 ↑ 5位から4位へ浮上。力強い成長を続け、2ヶ月連続で順位を上げている。 5 PHP 6.973 ↓ 4位から5位へ下落。下落傾向 6 C# 6.809 ↑ 7 (Visual)Basic 4.924 ↓ 8 Objectiv
update: なんとMatz様から直々の指摘を受けてしまった: http://twitter.com/yukihiro_matz/status/26685527109 実はこのポストの後、ベンチプレスを1セットやって一息ついていいたところ、schemeの例が間違っていることに気付いた。確かにループのボディーにあたるlambdaでletでローカルを作ってキャプチャーするとMatz様のおっしゃる通り。 俺はPerlに心を侵されていたのか… いつも「動けばいいやぁ~」みたいな気持で使っていたclosureだが、もう一度勉強しなおした方がよさそうだ。 (let ([closures '()]) (for-each ;; これがループのボディーになるよな。 (lambda (i) ;; じゃ、ここにローカル (let ([loop-local-var (sprintf "foo~A" i)]) (
・著者:Federico Biancuzzi、Shane Warden 編 村上 雅章、佐藤 嘉一、伊藤 真浩、頃末 和義、鈴木 幸敏 訳 ・定価:3780円(本体3600円+税) ・B5変 500頁 ・ISBN 978-4-87311-471-2 ・発売日:2010/09 伝説のプログラミング言語設計者たちの豪華インタビュー集! BASIC、Fortran、ML、SQL、Haskell、Java、Python、Perlをはじめとする、さまざまなプログラム言語の設計者たちへのインタビュー集。伝説的な開発者たち―アルフレッド・エイホ、ロビン・ミルナー、ピーター・ワインバーガー、ブライアン・カーニハン、バートランド・メイヤー、ビャーネ・ストラウストラップ、ラリー・ウォール、ジェイムス・ゴスリングらから、言語設計の背景、設計哲学、方向性などについて聞き出している。言語開発者たちの生の声が
http://www.slideshare.net/nishio/ss-5019563 「プログラミング言語の設計判断」というタイトルでは要約しきれてない内容ですが。図が足りないとか図が足りないとかを修正してから公開しようと思っていたのに気がついたら1週間もたってしまった(即日公開するつもりだったのに!)のでとりいそぎ公開します。
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く