はてなキーワード: Pyramidとは
スマホで撮影した動画など、PC上の動画をH.264でエンコしてBDAVとして焼く方法です
お手軽なのでmakeBDAV1.3を使っていますが、ffmpeg直でやっても構いません
■手順
1.MakeBDAV1.3の「設定」でFFmpegのオプション1に以下のように設定する(オーディオエンコはお好みで)
注:vbv-maxrate, vbv-bufsize, level, refの値は以下で決定
https://web.archive.org/web/20160307043741/http://note.chiebukuro.yahoo.co.jp/detail/n324215
Quick Tutorial for Pyramid は公式のチュートリアル
https://docs.pylonsproject.org/projects/pyramid/en/latest/quick_tutorial/index.html
$ $VENV/bin/cookiecutter gh:Pylons/pyramid-cookiecutter-starter --checkout 1.9-branch
として、プロンプトの問いに答えるとサンプル的なアプリができる。
ghはgithubか。
引数で指定できるテンプレートは https://github.com/Pylons?q=pyramid-cookiecutter
sqlalchemyを使うものは分かるけど、zodbって何?
アプリは以下のようにして起動する。
$ env/bin/pserve development.ini --reload
このpserveというPythonモジュールでアプリ動かしたりする。
超単純なPyramidアプリを作って、WSGIのイメージをつかむ。
app.py を書き写して動かしたらHello Worldが動いた。
viewとURLの紐付けはconfig.add_routeしてconfig.add_viewする。add_viewしてからadd_routeしても大丈夫だった。
viewにはrequestが渡される。requestに色々入ってそう。
waitressは知らないけど、serveでHTTPサーバ作ってWSGIアプリを公開できるのかな?
print('Incoming request')
...instead of:
print 'Incoming request'
Inernal Server Errorになった。アプリのほうではValueErrorでresponseを返すようにと怒られていた。text/plainとか返すには何かしないとダメっぽい。
print(xyz)してみろ、ということかな。1と同じくInernal Server Errorになって、コンソールにはNameErrorが出た。
CGIかな?
マヤの話し。どうなんだろうか。
ネイチャーに掲載されたからって、ほんとかどうか分からない、こんな世の中では..。何が本当かは、分からないね。
http://www.yucatanliving.com/news/yucatan-news-26
15 Year Old Discovers Hidden Mayan City
A fifteen year old from Quebec has used satellite photos, Mayan astronomy and his own intuition to solve some questions about the placement of Mayan cities and to discover a new city. William Gadoury loves everything Mayan and was studying Mayan constellations when he overlayed a constellation map on a map of the Yucatan Peninsula. He discovered that the known cities, like Chichen Itza and Uxmal, were exactly lined up with the stars in major Mayan constellations. Using this same map and thought process, he noticed that the third star in the 23rd constellation he was studying was missing. He found satellite images from space agencies, including NASA, JAXA (from Japan) and Google Earth, and discovered a third city where the third star of the constellation said it would be. He has named this city, as yet unexplored on the ground, K'aak Chi, or Mouth of Fire. The lost city has a pyramid that is 86 meters high, as well as 30 other visible (from the photos) structures. It is on the border with Belize. This young man is hoping to go to the International Science Fair in Brazil in 2017 but is lacking in the necessary funds.
あけおめ!今年は巳年。へび。へびと言えばPython。そう今年は全てのwebエンジニアがPythonを勉強する最高の環境が整った年なのです。
必要です!必要だと思います。もはやPythonはwebエンジニアにとって必修言語となりつつあると思います。Linuxの多くの箇所でシステム言語として用いられ、可読性の高さから多くの技術系書籍のサンプルコードとして用いられ、科学技術系分野におけるエコシステムの充実っぷりはますます磨きがかかっており、様々なライブラリがどんどん出てくる現状を「Pythonわからないから自分には関係無い」と遠巻きに眺めるのはもったいないです。
あなたが既に他の言語に慣れ親しんでいるなら、特にRubyなどに精通していれば「1週間」で基本的な読み書きは出来るようになるでしょう。そのくらいPythonは敷居の低い言語です。またweb上のチュートリアルドキュメントが大変に充実していますので(もちろん和訳済み!)費用0円で勉強開始できるお手軽言語でもあります。
これは大変に悩ましい問題で、自信を持ってお薦めできるバージョンが無いのが残念な現状です。2系と3系は特に文字コード周りを中心に言語体系にそれなりの差があり、日本語を扱うエンジニアにとっては悩ましい問題です。結論としては「どちらも読み書きできる」ようにした上で「3系で書く」ですかね。2と3の違いを理解しておかないと必ずどこかで躓きます。特にweb上の情報はまだほとんどが2系ですが、ぱっと見て2と3のどちらのバージョンで書かれた情報なのかを判断できないと多くのweb上の情報を利用できずにもったいないです。
先述しましたが和訳済みのチュートリアルが充実しているのがPythonの特徴でもありますので、まずは目を通す事をお勧めします。
ぜひ超充実したドキュメント群を覗いてみてください。「チュートリアル」を読めばだいたいの言語仕様がつかめるはずです。「ライブラリリファレンス」はあなたの最高の辞書となるでしょう。
その上で、やっぱり書籍で勉強したいということでしたら以下の本がお薦めです。
・プログラミング自体が初めての人向け
・他言語を既に知っている人向け
みんなのPython 第3版(柴田 淳) ・・・2版と3版で大きく内容が異なります 2版はPython2系、3版はPython3系を中心に解説
・進んだトピックを扱う中級者以上向け
pythonはインデントの存在があるので無機能エディタで大規模なコードを書くのは案外骨が折れます。贅沢系IDEの代表格はPyCharm(有料$99)でMac,Windows,Linuxの3プラットフォームに対応しており、一つのアカウントでいくつものマシンにインストールできます(同時に使う事はできない)。30日間の無料トライアルもありますしトライアル期間が過ぎても一回あたり(たしか)5分ぐらいなら継続して使えます。無料IDEだとEclipseプラグイン、Netbeansあたりでしょうか。Netbeansは公式開発は既に終了しておりあまり安定していません。
大規模な開発ならDjangoが第一候補。歴史が長いフルスタックなフレームワークですがまだ正式版がpython3系に対応していない。最近勢いがあるPyramidは3系に対応済み。各webフレームワークについては各開発者同士が「筋が悪い」「Pythonとしておかしい」「トレンドから3年は遅れてる」などとガチンコで思いの丈をぶつけ合っている以下の記事も参考にしてください。http://www.atmarkit.co.jp/news/201209/24/pycon.html
とりあえず最低でもDjangoとPyramidは両方使ってみてから自分にあった方を選択するといいと思います。
・Numpy/Scipy
科学技術系の人が好んでpythonを使う理由の一つがNumpy。数値行列計算を内部でCを使って計算するために非常に高速。インターフェイスは書きやすいpythonだけども実行速度はCネイティブ並みというとてもありがたいライブラリです。現在のPythonの盛り上がりに間違いなく大きく影響しているライブラリ。
・nltk
言語処理で使われるライブラリ。英語がベースとなってますが工夫すれば日本語でも全然使えます。参考文献 http://nltk.googlecode.com/svn/trunk/doc/book-jp/ch12.html
・multiprocessing
並列処理ライブラリ。CPUのマルチコアを全て使い切って無駄無く高速に処理を行いたい時に重宝します。個人的に大好きなライブラリ。頑張ればちょっとした分散並列システムも作れます。このライブラリのお陰で自宅にある10台*(擬似)8コアでお手軽python並列処理クラスタを30分ぐらいで作る事ができました。
Multilevel Marketing Plans
Produced in cooperation with the North American Securities Administrators Association
November 1996
Multilevel marketing plans, also known as "network" or "matrix" marketing, are a way of selling goods or services through distributors. These plans typically promise that if you sign up as a distributor, you will receive commissions -- for both your sales of the plan's goods or services and those of other people you recruit to join the distributors. Multilevel marketing plans usually promise to pay commissions through two or more levels of recruits, known as the distributor's "downline."
If a plan offers to pay commissions for recruiting new distributors, watch out! Most states outlaw this practice, which is known as "pyramiding." State laws against pyramiding say that a multilevel marketing plan should only pay commissions for retail sales of goods or services, not for recruiting new distributors.
Why is pyramiding prohibited? Because plans that pay commissions for recruiting new distributors inevitably collapse when no new distributors can be recruited. And when a plan collapses, most people -- except perhaps those at the very top of the pyramid -- lose their money.
The Federal Trade Commission cannot tell you whether a particular multilevel marketing plan is legal. Nor can it give you advice about whether to join such a plan. You must make that decision yourself. However, the FTC suggests that you use common sense, and consider these seven tips when you make your decision:
Avoid any plan that includes commissions for recruiting additional distributors. It may be an illegal pyramid.
Beware of plans that ask new distributors to purchase expensive inventory. These plans can collapse quickly -- and also may be thinly-disguised pyramids.
Be cautious of plans that claim you will make money through continued growth of your "downline" -- the commissions on sales made by new distributors you recruit -- rather than through sales of products you make yourself.
Beware of plans that claim to sell miracle products or promise enormous earnings. Just because a promoter of a plan makes a claim doesn't mean it's true! Ask the promoter of the plan to substantiate claims with hard evidence.
Beware of shills -- "decoy" references paid by a plan's promoter to describe their fictional success in earning money through the plan.
Don't pay or sign any contracts in an "opportunity meeting" or any other high-pressure situation. Insist on taking your time to think over a decision to join. Talk it over with your spouse, a knowledgeable friend, an accountant or lawyer.
Do your homework! Check with your local Better Business Bureau and state Attorney General about any plan you're considering -- especially when the claims about the product or your potential earnings seem too good to be true.
The FTC also publishes: Wealth-Building Scams; Business Opportunities: Avoiding Vending Machine and Display Rack Scams; Work-at-Home Schemes; Franchise and Business Opportunities; and A Consumer Guide to Buying a Franchise. For a free copy of these brochures or a copy of Best Sellers, a complete list of the FTC's consumer publications, contact:
Federal Trade Commission
(202) 326-2222
Where to Complain
You may send questions or complaints to:
Correspondence Branch
Federal Trade Commission
Although the FTC cannot resolve individual disputes, the information you provide may indicate a pattern of possible law violations requiring action by the Commission.
You also may want to contact the National Fraud Information Center (NFIC), a project of the National Consumer League, at 1-800-876-7060, 9 a.m. - 5:30 p.m. EST, Monday - Friday. The NFIC is a private nonprofit organization that operates a consumer hotline to provide service and assistance in filing complaints. NFIC helps the FTC and the state Attorneys General by entering complaints into a computerized database to help track and identify fraud operators.
和訳は以下のページ。
http://www.ne.jp/asahi/kato/logos/ftc-mlm.htm