ぱぴろん(Papylon)は、満たすべき性質(property)を記述することでテストケースを自動生成する Python 用テスティングツールです。いわゆる"QuickCheck"系の流れを汲み、 FsCheck と ScalaCheck の影響を強く受けています。テストしたい対象の振る舞うべき性質を記述して実行すると、テストケースをランダムに生成して実行し、性質が成り立つかどうかを確認します。
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type HttpStatus = | |
{ Code: string; Message: string } | |
override self.ToString () = sprintf "%s %s" self.Code self.Message | |
let httpStatus code message = { Code = code; Message = message } | |
let httpStatusList =[ | |
httpStatus "100" "Continue"; | |
httpStatus "101" "Switching Protocols"; | |
httpStatus "102" "Processing"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import std.stdio; | |
import std.stream; | |
import std.socket; | |
import std.typecons; | |
import msgpack; | |
void main() | |
{ | |
communicateWithPythonClient(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// target : exec メソッドを持つオブジェクト | |
// num : exec メソッドに渡す値 | |
let inline exec< ^T when ^T : (member exec : int -> string)> target num = | |
(^T : (member exec : int -> string) (target, num)) | |
// exec メソッドを持つインターフェイス | |
type IExec = | |
abstract exec : int -> string | |
// IExec インターフェイスを実装するクラス |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
親愛なる日本の F# 開発者の皆さん | |
Dear Japanese F# Developers | |
私の名前はペトロギアナキス・パンテリスといい、 {m}brace (http://www.m-brace-net) | |
のプロジェクト・マネジャーをしております。現在、{m}brace は品質保証テストの段階にあり、 | |
プライベート・ベータ版が2か月以内に利用可能になります。私たちはアイディアや私たちが | |
やってきた実装、そしてもちろん沢山の F# のコードや例を提示するためにビデオ会議のイベント | |
を企画したいと考えております。 | |
My name is Petrogiannakis Pantelis and i am the project manager of {m}brace | |
(http://www.m-brace.net). At this time {m}brace is under quality assurance |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from tkinter import Frame, Button, LEFT, BOTH | |
class MyFrame(Frame): | |
def __init__(self, master=None): | |
Frame.__init__(self, master) | |
self.title_text = 'タイトル' | |
self.master.title(self.title_text) | |
self.b_change_title = Button(self, font=('Consolas', '24'), | |
text='タイトル変更', command=self.change_title) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace Rhino.Mocks.Sample | |
{ | |
public interface IAlgorithm | |
{ | |
string Run(int nuber); | |
} | |
} |
- 原文
http://www.hanselman.com/blog/ProductivityVsGuiltAndSelfLoathing.aspx
- 著者
Scott Hanselman
罪の意識が迫ってきます。あなた以外の皆が物事を片づけているように見えます。あなたは自分をベッドから引きずり出し、会社に行き、Eメールをチェックし始め、削除しだし、そしてあっという間にお昼です。昼食を、もしかしたら自分のデスクで摂り、幾つかのひどい会議に出席し、もう3時です。そこから 本 当 に 働き始め、いい感じになってきたなと感じてきたところで5時か6時になっています。もう帰り始める時間です。今日は本当に何もできなかったと感じるので、残業して―今日みたいに―取り返そうとするでしょう。
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 課題2-3 | |
import sys | |
import sqlite3 | |
DBNAME = 'items.db' | |
def filter_by_cost(conn, lower_bound): | |
c = None | |
try: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type BindBuilder () = | |
member self.Bind (x, f) = f x | |
member self.Return x = x | |
let bind = BindBuilder() | |
bind { | |
let! x = 1 | |
let! y = 2 | |
return x + y |