Skip to content

Instantly share code, notes, and snippets.

# coding: utf-8
"""
ハンバーガーショップの合計金額計算
"""
import sys
from collections import defaultdict
########
# マスターデータ定義クラス群
@mogi
mogi / gist:5118118
Last active December 14, 2015 16:49
| static/
| | | css/
| | | fonts/
| | | images/
| | | js/
| | | movies/
| browser_scripts/ # js
| data/
| scripts/ # wsgi
| submodule/
for i=1, 100 do
if i%3 == 0 and i%5 == 0 then
print(fizzbuzz')
elseif %3 == 0 then
print('fizz')
elseif i%5 == 0 then
print('buzz')
else
print(i)
end
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
csvから文字列を探して位置を返す
# 入力形式. csvが渡されることを想定
"Z","T","A","V",
"P","G","P","N",
# 出力形式
@mogi
mogi / dateutil.py
Created October 28, 2014 03:04
dateutil.parser.parseの使いかた
>>> import dateutil.parser
>>> print dateutil.parser.parse('Oct 3 12:00:00')
2014-10-03 12:00:00
>>> type(dateutil.parser.parse('Oct 3 12:00:00'))
<type 'datetime.datetime'>
@mogi
mogi / make_ctags.sh
Created January 16, 2015 08:47
git-hook make crags
#!/bin/sh
ctags -R
@mogi
mogi / test.html
Last active August 29, 2015 14:16
hogan.js test
<!DOCTYPE html>
<html>
<head>
<script src="http://www.google.com/jsapi"></script>
<script>google.load('jquery', 1);</script>
<script src="http://twitter.github.com/hogan.js/builds/2.0.0/hogan-2.0.0.js"></script>
<script>
$(function() {
function callAPI (method, url, async){
#!/usr/bin/python
#
# Get uuid by blkid output.
# :param blkid: str
# :param target: str
# :rtype :str
#
import json
import sys
import shlex
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
import sys
import shlex
from ansible.module_utils.basic import *
DOCUMENTATION = '''
---
*.bin
*.swp
*.bak
*.old
*.egg
*.egg-info
*.crt
*.key
*.pem
*.pub