Markdown은 텍스트 기반의 마크업언어로 2004년 존그루버에 의해 만들어졌으며 쉽게 쓰고 읽을 수 있으며 HTML로 변환이 가능하다. 특수기호와 문자를 이용한 매우 간단한 구조의 문법을 사용하여 웹에서도 보다 빠르게 컨텐츠를 작성하고 보다 직관적으로 인식할 수 있다. 마크다운이 최근 각광받기 시작한 이유는 깃헙(https://github.com) 덕분이다. 깃헙의 저장소Repository에 관한 정보를 기록하는 README.md는 깃헙을 사용하는 사람이라면 누구나 가장 먼저 접하게 되는 마크다운 문서였다. 마크다운을 통해서 설치방법, 소스코드 설명, 이슈 등을 간단하게 기록하고 가독성을 높일 수 있다는 강점이 부각되면서 점점 여러 곳으로 퍼져가게 된다.
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 bs4 import BeautifulSoup as bs | |
from urllib2 import urlopen | |
from urllib2 import HTTPError | |
import re | |
names_list=''' | |
Vitalik Buterin | |
Joseph Lubin | |
Max Keiser | |
Don Tapscott |
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 websocket #pip install websocket-client | |
import thread | |
import time | |
import json | |
def on_message(ws, message): | |
print(message) | |
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 | |
import db_query_frames | |
import time | |
class InfluxHandler(object): | |
def __init__(self, _db_name = None, _host_frame = db_query_frames.WRITE_HOST): | |
self.db_host = _host_frame.format(database_name = _db_name) | |
self.db_name = _db_name |
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 websocket | |
import json | |
def on_msg(ws,msg): | |
print(msg) | |
def on_cls(ws): | |
print("close") | |
def on_open(ws): |
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
const app = require('express')(); | |
const http = require('http').Server(app); | |
const io = require('socket.io')(http); | |
const WebSocket = require('ws'); | |
const request = require('request'); | |
function getPairsPromise(){ | |
return new Promise((resolve, reject)=>{ | |
request('https://api.binance.com/api/v1/ticker/24hr', function(err,res,body){ | |
if(!err&& res.statusCode ==200){ |
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
const app = require('express')(); | |
const server = require('http').Server(app); | |
const request = require('request'); | |
const Websocket = require('ws'); | |
function getPairs(){ | |
return new Promise((resolve, reject)=>{ | |
request('https://cex.io/api/currency_limits', function(error, res, body){ | |
if (res.statusCode == 200 && !error){ |
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
const app = require('express')(); | |
const server = require('http').Server(app); | |
const request = require('request'); | |
const io = require('socket.io-client'); | |
server.listen(3005); | |
app.get('/', function (req, res, err) { |
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
# Go to home directory | |
cd ~ | |
# You can change what anaconda version you want at | |
# https://repo.continuum.io/archive/ | |
curl -Ok https://repo.continuum.io/archive/Anaconda3-4.1.1-MacOSX-x86_64.sh | |
bash Anaconda3-4.1.1-MacOSX-x86_64.sh -b -p ~/anaconda | |
rm Anaconda3-4.1.1-MacOSX-x86_64.sh | |
echo 'export PATH="~/anaconda/bin:$PATH"' >> ~/.bash_profile |
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
#!/usr/bin/python | |
import datetime | |
import sys | |
print datetime.datetime.fromtimestamp(float(sys.argv[1])/1000).strftime('%Y-%m-%d %H:%M:%S.%f') |
OlderNewer