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 | |
# Usage: slackpost <token> <channel> <message> | |
# Enter the name of your slack host here - the thing that appears in your URL: | |
# https://slackhost.slack.com/ | |
slackhost=PUT_YOUR_HOST_HERE | |
token=$1 |
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:utf-8 | |
# Copyright 2011 litl, LLC. All Rights Reserved. | |
import httplib | |
import re | |
import urllib | |
import urlparse | |
from flask import Blueprint, request, Response, url_for | |
from werkzeug.datastructures import Headers |
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 | |
### BEGIN INIT INFO | |
# Provides: kibana | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: Runs kibana daemon | |
# Description: Runs the kibana daemon as a non-root user | |
### END INIT INFO | |
# Process name |
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
--- | |
ctx: | |
metadata: null | |
watch_id: "log_error_watch" | |
payload: | |
_shards: | |
total: 2 | |
failed: 0 | |
successful: 2 | |
hits: |
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
""" | |
Fast Campus Web Programming 6th | |
Assignment 1 Solution | |
---------------------- | |
함수 호출은 첫번째 문제를 제외하고 주석처리 되어 있습니다. | |
실행해보시려면 주석을 제거해주세요. | |
idle이라면 직접 호출하셔도 됩니다. | |
""" | |
def reverse_string(user_input): | |
user_input = list(user_input) |
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
>>> int("2**10") | |
Traceback (most recent call last): | |
File "<pyshell#4>", line 1, in <module> | |
int("2**10") | |
ValueError: invalid literal for int() with base 10: '2**10' | |
>>> int(eval("2**10")) | |
1024 | |
>>> eval("2.3**10") |
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://stackoverflow.com/questions/6835835/jquery-simple-polling-example | |
// @chrisjleu's anwser | |
(function poll() { | |
$.ajax({ | |
url: "/api/thread/{id}/comments", | |
type: "GET", | |
success: function(data) { | |
console.log("polling"); | |
// Render polling | |
render_polling(); |
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
// Long Polling (Recommened Technique - Creates An Open Connection To Server ∴ Fast) | |
(function poll(){ | |
$.ajax({ url: "server", success: function(data){ | |
//Update your dashboard gauge | |
salesGauge.setValue(data.value); | |
}, dataType: "json", complete: poll, timeout: 30000 }); | |
})(); |
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: utf-8 -*- | |
from __future__ import unicode_literals | |
from gevent import monkey; monkey.patch_all() | |
import re | |
from urlparse import urljoin | |
from gevent.pool import Pool | |
import requests |
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
> pip3 install virtualenv # 3.x의 python library virtualenv 설치 | |
> python3 -m venv myenv # python3 환경을 virtual environment를 myenv 폴더에 셋팅 | |
> myenv\Scripts\activate.bat # python3 가상 환경을 적용 | |
> deactivate.bat # 가상 환경 해제 |