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 json | |
import requests | |
from bs4 import BeautifulSoup | |
def load_mtg_jp(): | |
url = 'http://mtg-jp.com/topics.html' | |
r = requests.get(url) | |
# GAEに持ち込むと文字コードが一致しないケースがあったため対応 | |
if r.encoding != r.apparent_encoding: | |
r.encoding = r.apparent_encoding |
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 -*- | |
from collections import deque | |
import random | |
z = u'ズン' | |
d = u'ドコ' | |
zzzzd = (z, z, z, z, d, ) | |
kys = u'キ・ヨ・シ!' |
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
$ python -c "import io" | |
Traceback (most recent call last): | |
File "<string>", line 1, in <module> | |
File "/usr/lib/python2.7/io.py", line 51, in <module> | |
import _io | |
ImportError: No module named _io |
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 | |
from types import MethodType | |
class Sample(object): | |
""" | |
一度実行するとメソッドの中身が変更される | |
""" | |
def method(self, value): | |
""" |
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
common.rb:67: [BUG] Segmentation fault |
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
gulp.task('browserify', function(){ | |
var browserify = require('browserify'); | |
browserify('<元になるファイル>', {<option>}) | |
.bundle() | |
.pipe(gulp.dest('<出力先ディレクトリ>')); | |
}); |
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
The schema version of 'Microsoft.AspNet.Mvc' is incompatible with version |
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
// | |
//Promiseの練習用 | |
// | |
// Promise1つだけのケース | |
// 引数をそのまま次のfunctionに渡すだけ | |
var return_number = function(num){ | |
return new Promise(function(onFulfilled, onRejected){ | |
onFulfilled(num); | |
}); |
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
npm install -g jshint |
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
python runtest.py --junitxml=<テスト結果を出力するファイル名> --cov-report xml --cov <テスト対象> |