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
# coding: utf-8 | |
import urllib | |
import json | |
def translate(text): | |
params = { | |
'appId': 'myAppId', | |
'text': text, | |
'from': 'en', |
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
# coding: utf-8 | |
import urllib | |
import json | |
def identify_lang(text): | |
params = { | |
'appId': 'myAppId', | |
'text': text, | |
} |
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
using System; | |
using System.Linq; | |
using System.Diagnostics; | |
using System.Reflection; | |
namespace foo | |
{ | |
class Program | |
{ | |
static void Main(string[] args) |
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
using System; | |
using System.Collections.Generic; | |
using System.Data.SqlClient; | |
using System.Diagnostics; | |
using Dapper; | |
namespace Foo | |
{ | |
// Dapper.Rainbowでは主キーの列名はIdが前提になっている | |
public class User |
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
using System; | |
using System.Collections.Generic; | |
using System.Data.SqlClient; | |
using System.Diagnostics; | |
using Dapper; | |
namespace Foo | |
{ | |
// Dapper.rainbowでは主キーの列名はIdが前提になっている | |
public class User |
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
# coding: utf-8 | |
""" | |
以下のURLを参考にさせていただきました | |
http://d.hatena.ne.jp/mohayonao/20110121/1295611356 | |
http://aidiary.hatenablog.com/entry/20110607/1307449007 | |
""" | |
import math | |
import array |
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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Data; | |
using FastMember; | |
namespace App | |
{ | |
// ここを参考にしました | |
// http://stackoverflow.com/questions/564366/convert-generic-list-enumerable-to-datatable |
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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using FastMember; | |
namespace Mapper | |
{ | |
public class Mapper | |
{ | |
public static IEnumerable<TDest> MapTo<TSrc, TDest>(IEnumerable<TSrc> src) |
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
using System; | |
using System.Collections.Generic; | |
namespace Money | |
{ | |
public class Money : IExpression | |
{ | |
internal int amount; | |
public string Currency { get; internal set; } |
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
critics={'Lisa Rose'=> {'Lady in the Water'=> 2.5, 'Snakes on a Plane'=> 3.5, | |
'Just My Luck'=> 3.0, 'Superman Returns'=> 3.5, 'You, Me and Dupree'=> 2.5, | |
'The Night Listener'=> 3.0}, | |
'Gene Seymour'=> {'Lady in the Water'=> 3.0, 'Snakes on a Plane'=> 3.5, | |
'Just My Luck'=> 1.5, 'Superman Returns'=> 5.0, 'The Night Listener'=> 3.0, | |
'You, Me and Dupree'=> 3.5}, | |
'Michael Phillips'=> {'Lady in the Water'=> 2.5, 'Snakes on a Plane'=> 3.0, | |
'Superman Returns'=> 3.5, 'The Night Listener'=> 4.0}, | |
'Claudia Puig'=> {'Snakes on a Plane'=> 3.5, 'Just My Luck'=> 3.0, | |
'The Night Listener'=> 4.5, 'Superman Returns'=> 4.0, |
OlderNewer