「Prelude」を含む日記 RSS

はてなキーワード: Preludeとは

2018-04-17

Quick Tutorial for Pyramidをやってみる

PyramidPython向けWebフレームワーク

Quick Tutorial for Pyramid公式チュートリアル

https://docs.pylonsproject.org/projects/pyramid/en/latest/quick_tutorial/index.html

Prelude: Quick Project Startup with Cookiecutters

$ $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モジュールアプリ動かしたりする。

01: Single-File Web Applications

超単純なPyramidアプリを作って、WSGIイメージをつかむ。

app.py を書き写して動かしたらHello Worldが動いた。

Analysisの項:
2. Lines 12-14. Use Pyramid's configurator in a context manager to connect view code to a particular URL route.

viewURLの紐付けはconfig.add_routeしてconfig.add_viewする。add_viewしてからadd_routeしても大丈夫だった。

3. Lines 6-8. Implement the view code that generates the response.

viewにはrequestが渡される。requestに色々入ってそう。

4. Lines 15-17. Publish a WSGI app using an HTTP server.

waitressは知らないけど、serveでHTTPサーバ作ってWSGIアプリを公開できるのかな?

Extra creditの項:
1. Why do we do this:
print('Incoming request')

...instead of:

print 'Incoming request'

Python3だから

2. What happens if you return a string of HTML? A sequence of integers?

Inernal Server Errorになった。アプリのほうではValueErrorresponseを返すようにと怒られていた。text/plainとか返すには何かしないとダメっぽい。

3. Put something invalid, such as print xyz, in the view function. Kill your python app.py with ctrl-C and restart, then reload your browser. See the exception in the console?

print(xyz)してみろ、ということかな。1と同じくInernal Server Errorになって、コンソールにはNameErrorが出た。

4. The GI in WSGI stands for "Gateway Interface". What web standard is this modelled after?

CGIかな?

2016-04-01

アルバム曲で (intro) , (prelude) , (interlude) , (reprise) , (~remix) いらなすぎ

曲数稼ぎで要らなすぎ

下手したら3曲ぐらいこの手の捨て音源入れてるアーチストいるからな、ストレスマッハで破裂するわ

最後の曲ファイルに無音からのしょーもない音源入れてる (Secret Track) は憤死しそうになる

(Bonus Track) は、曲として成立してるならギリギリ許せる

(Radio Edit) は、入ってるとなんか嬉しい

2011-12-17

力尽きた

I know how to become a super-easy Your Life?

Tips on how to live it happily for everyone

I become more comfortable with the power off

Also suffering are all spicy sloppy vision, and white security.

The world's vanities,

The emptiness of the first pain and sadness.

The world is going to change.

Can even change to ease the suffering.

If you can make your day burdened with dirty

It should be possible to throw away what we have so

I understood just how sloppy or the world?

Suffering and illness, and we insist on such things.

And stick to what I see.

Cling to the things that you hear.

Taste and smell differ from person to person

What is also not helpful.

The bad stick to tea mind wavers.

It is "free" What is he.

A big talk and while it is alive, various things are.

You can see what a miserable so difficult.

But I go place to place with us.

Which is invisible to anyone.

I try to be bright and without force.

Because you will enjoy about You can not see the future.

What guy I'm feeling it alive.

Be difficult to live and certainly correctly.

But I'll live can even brighter to anyone.

Tips have a Bodhisattva living. There is no need to live in suffering.

I enjoy living in it becomes Buddha.

Once knowing the risk would be quite bad

Reasonable fear of living is help.

It is misread

Throw away your heart you are, It's not to say.

Do not forget your dreams and fantasies, and compassion,

Once nirvana But even where it is located.

Life is no need to change anything, just the perception of change.

If you have plenty in mind, anyone become a Buddha.

Remember the wisdom of this melt. But few words.

Make sense I know that I'm fine without thinking.

It would be nice suffering becomes smaller.

You all suffering admits even lie no more bullshit, I like that.

Let the past may be a prelude to forget all.

But just want to remember it.

Look tweeting If you're so inclined,

It's just good chanting in the mind

You see, open your ears listen well

"You'll cast, the bad idea is disappears, the soul is silenced, all things in here, it's beyond everything. "

"At that enlightenment will come true. All will be fulfilled in this mantra. "

don't worry -- that's OK

 
ログイン ユーザー登録
ようこそ ゲスト さん