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 __future__ import absolute_import | |
from boto3 import Session | |
from flask import current_app | |
from dodo.app import app | |
known_devices = { |
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
class Car: | |
def __init__(self, type): | |
self.type = type | |
class License: | |
def __init__(self, driver_name): | |
self.driver_name = driver_name | |
def print(self): | |
print("{}의 {}종 면허입니다.".format(self.driver_name, self.LICENSE_TYPE)) |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<style> | |
span.done { | |
text-decoration: line-through; | |
} | |
</style> | |
</head> | |
<body> |
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
1. `Win` + `R` 키나 `시작` > `실행` 버튼을 눌러 `cmd` 를 입력합니다. | |
2. 실행된 창에 `cd <프로젝트 디렉토리>` 를 입력하고 엔터를 입력합니다. | |
- (e.g. `C:\Users\Student1\포트폴리오` 가 프로젝트 디렉토리인 경우 `cd C:\Users\Student1\포트폴리오`) | |
- 프로젝트 디렉토리는 `app.py` 와 `template` 등의 디렉토리가 보이는 디렉토리를 말합니다. | |
3. `python app.py` 를 입력하고 엔터를 입력합니다. | |
- 이 때 `내부 또는 외부 명령, 실행할 수 있는 프로그램, 또는 배치파일이 아닙니다.` 라는 메시지가 뜨면 python 을 설치해야합니다. | |
4. 웹 브라우저를 열어 `http://localhost:5000` 을 입력합니다. |
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
<link rel="import" href="../chart-js/chart-js.html"> | |
<link rel="import" href="../google-map/google-map.html"> | |
<polymer-element name="my-element"> | |
<template> | |
<style> | |
:host { | |
position: absolute; | |
width: 100%; |
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 functools import wraps | |
from collections import namedtuple | |
from sqlalchemy.schema import Column | |
from sqlalchemy.sql import or_, expression as expr | |
from sqlalchemy.sql.expression import literal, ColumnClause | |
from sqlalchemy.types import String, Integer | |
from sqlalchemy.orm.query import Query | |
from sqlalchemy.orm.attributes import InstrumentedAttribute | |
from flask import request |
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
#Stack is LIFO(Last In First Out) | |
#Queue is FIFO(First In First Out) | |
import sys | |
stack = [] #Stack create | |
queue = [] #Queue create | |
def main(): | |
print '1. Insert Stack' | |
print '2. Delete Stack' |
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
(defmacro defentity [type args & body] | |
(let [name (docname type) | |
constructor (symbol (str type "/create")) | |
fn-get-by-id (symbol (str "get-" name "-by-id")) | |
fn-get (symbol (str "get-" name)) | |
fn-gets (symbol (str "get-" name "s")) | |
mc-with-col (symbol (str "with-" name "s"))] | |
`(do | |
(defrecord ~type ~args | |
~@body) |
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
(defmacro external-url-for [& args] | |
`(let [url# (url-for ~@args)] | |
(str (name (:scheme *request*)) | |
"://" | |
(:server-name *request*) | |
":" | |
(:server-port *request*) | |
url#))) |
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
(defprotocol IDocumentable | |
"Representable protocol for mongodb's document name" | |
(docname [e])) | |
(defprotocol IEntity | |
"Protocol of whole entity." | |
(add! [e]) | |
(edit! [e]) | |
(remove! [e])) |