This file contains hidden or 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
| <div class="whole_box" style="width:100%;height:1000px;margin:0;padding:0;text-align:center;background-color:#4FB2D6;background-size:auto; background-attachment:fixed; background-position:right bottom; background-repeat:no-repeat; background-image:url(http://i.imgur.com/Vwrw3q4.gif?1);"> | |
| </div> |
This file contains hidden or 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: utf8 -*- | |
| from flask import Flask | |
| from flask import request | |
| import MeCab | |
| app = Flask(__name__) | |
| @app.route('/', methods=["GET"]) | |
| def get(): | |
| text = request.args.get('text') |
This file contains hidden or 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 pandas as pd | |
| import pandas.io.data | |
| import datetime | |
| #text = """A, AAPL, AMCC, AMD, AMGN, AMKR, AMNT.OB, AMZN, APC, ASOG.PK, AULO.OB, BAC, BBD-A.TO, BBD-B.TO, BEEI.OB, BKSD.OB, BP.BA, BPMI.PK, C, CAJT.PK, CAT, CGFI.OB, CHINA, CHKP, CIEN, CL, CLEC, CLNE, CNLG, COKE, CPAH.OB, CPHD, CPRT, CRDN, CRGN, CSCO, CSRVE.OB, CTS, CTXS, CVM, CVX, DE, DELL, DLTR, DO, DOG, DSCM, DVNNF.OB, DYN, EGN, ELNK, ELX, EP, ERJ, ETFC, EVEH.OB, FARO, FDO, FILE, FLIR, FNLY.OB, FNPR.OB, FORC.OB, FPP, GAGO.PK, GBVS.OB, GCAP.PK, GDKI.PK, GDTI.OB, GE, GEPT.PK, GERN, GFCI.PK, GILD, GLW, GOOG, GRDB.OB, GRMN, GS, GTXO.OB, GWGI.PK, HAL, HAST, HCKT, HD, HK, HPQ, HRAL.PK, IBM, IMDS.OB, IMGM.OB, INFY, INTC, IOC, IRF, JAVA, JCP, JDSU, JNJ, JNPR, JYHW.OB, K, KDSM.OB, KKD, KLDO.OB, KO, LEG, LOW, LRCX, LU, medx, MINI, MKC, MLNK, MNLU.OB, MO, MON, MOT, MRK, MSFT, MVBY.PK, MYL, NGEN, NGLS, NOIZ, NOK, NOVL, NOVOE.OB, NTGR, NVDA, NVS, NXRA.PK, OMI, ORCL, OSTK, PDLI, PEGA, PEP, PFE, PG, PHLI.OB, PNM, PPBV.OB, PWER, PYTO.OB, PZE, PZZA, Q, QCOM, QPCIE. |
This file contains hidden or 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 networkx as nx | |
| from IPython.display import display, HTML | |
| def d3_graph(G): | |
| text_edges = '' | |
| edges = G.edges() | |
| length = len(edges) | |
| for index, edge in enumerate(edges): | |
| text = '{"source":"'+edge[0]+'","target":"'+edge[1]+'"}' | |
| if index == length-1: | |
| text_edges = text_edges + text |
This file contains hidden or 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
| #!/bin/bash | |
| # Following the guide found at this page | |
| # http://programmingarehard.com/2014/03/17/behat-and-selenium-in-vagrant.html | |
| echo "\r\nUpdating system ...\r\n" | |
| sudo apt-get update | |
| # Create folder to place selenium in |
This file contains hidden or 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 flask import Flask, request, Response | |
| app = Flask(__name__) | |
| def check_auth(username, password): | |
| """This function is called to check if a username / | |
| password combination is valid. | |
| """ | |
| return username == 'admin' and password == 'secret' |
This file contains hidden or 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 flask import Flask | |
| app = Flask(__name__) | |
| @app.route("/") | |
| def hello(): | |
| return "Hello World!" | |
| if __name__ == "__main__": | |
| app.run(host='0.0.0.0', port=80) |
This file contains hidden or 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 boto.dynamodb2.layer1 import DynamoDBConnection | |
| from boto.regioninfo import RegionInfo | |
| dynamodb = DynamoDBConnection( | |
| region=RegionInfo(name='ap-northeast-2', | |
| endpoint='dynamodb.ap-northeast-2.amazonaws.com'), | |
| aws_access_key_id=aws_access_key_id, | |
| aws_secret_access_key=aws_secret_access_key | |
| ) | |
| print(requests.connection) |
This file contains hidden or 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 pyArango.connection import * | |
| conn = Connection() | |
| conn.createDatabase(name = "test_db") | |
| db = conn["test_db"] #all databases are loaded automatically into the connection and are accessible in this fashion | |
| collection = db.createCollection(name = "users") #all collections are also loaded automatically | |
| # collection.delete() # self explanatory | |
| for i in xrange(100) : | |
| doc = collection.createDocument() |
This file contains hidden or 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
| ### 출처 | |
| # http://blog.opid.kr/427 | |
| # 400, 403, 404 에러가 없는 url만 간추림 | |
| ### 언론사 리스트 | |
| # 중앙일보 | 구글뉴스 | 에이빙뉴스 | 중부매일 | 에버뉴스 | | |
| # 경향닷컴 | 데이터넷 | 세계일보 | 뉴스위드 | 뉴스포스트 | | |
| # 르몽드 디플로마티크 | 컨슈머타임스 | MBC | 한국아이닷컴 | 노컷뉴스 | | |
| # K모바일 | 탑라이더 | 한국경제 | 동아닷컴 | 엑스포저널 | |