https://michigusa-nlp.tistory.com/68 외부 서비스의 데이터를 python으로 slack에 통지하기 slacker 설치하기 먼저 slacker를 설치한다 $ python3 -m pip install slacker slacker의 공식 github 링크를 타고 들어가면 예시들을 볼 수 있다. slack에서 token과 webhook url 가져오기 token 취득 token 은.. michigusa-nlp.tistory.com
const chart = { type: 'bar', data: { labels: ['Week 1', 'Week 2', 'Week 3', 'Week 4'], datasets: [{ label: 'Retweets', data: [12, 5, 40, 5] }, { label: 'Likes', data: [80, 42, 215, 30] }] } } const encodedChart = encodeURIComponent(JSON.stringify(chart)); const chartUrl = `https://quickchart.io/chart?c=${encodedChart}`; console.log(chartUrl); https://quickchart.io/documentation/send-charts-with-..
from slacker import Slacker from PIL import Image import requests import os image = "{url}" slack = Slacker(token) file = Image.open(requests.get(image, stream=True).raw) filename = DateUtils.timestamp() + '.png' file.save(filename) slack.files.upload(filename, channels='#' + channel) os.remove(filename) https://pydole.tistory.com/entry/Slack-%ED%99%9C%EC%9A%A9-python%EC%9D%84-%EC%9D%B4%EC%9A%A9..
import time print(time.time()) https://inma.tistory.com/96 [Python] datetime, timestamp 변환 timestamp 만들기 timestamp = 초 * 분 * 시 * 일 timestamp = 60 * 60 * 24 * 30 print(timestamp) # 2592000 str 으로 변환 timestamp ➠ str import time timestamp = time.time() s = str(timestamp) print(s).. inma.tistory.com
implode ( string $separator , array $array ) : string explode ( string $separator , string $string , int $limit = PHP_INT_MAX ) : array https://www.php.net/manual/en/function.implode.php PHP: implode - Manual It's not obvious from the samples, if/how associative arrays are handled. The "implode" function acts on the array "values", disregarding any keys: 'four', 'five', '3rd' => 'six' );echo imp..
isinstance(s, str) https://stackoverflow.com/questions/4843173/how-to-check-if-type-of-a-variable-is-string How to check if type of a variable is string? Is there a way to check if the type of a variable in python is a string, like: isinstance(x,int); for integer values? stackoverflow.com
pip3 install requests pip3 install Pillow from PIL import Image import requests import time file = Image.open(requests.get(image, stream=True).raw) filename = time.time() + '.png' file.save(filename) https://stackoverflow.com/questions/7391945/how-do-i-read-image-data-from-a-url-in-python How do I read image data from a URL in Python? What I'm trying to do is fairly simple when we're dealing wit..
'EEEE': Day in Week,(Sunday-Saturday) 'EEE': Day in Week, (Sun-Sat) https://stackoverflow.com/questions/33092074/whats-the-meaning-eee What's the meaning 'EEE' Looking at date filter on angular.js, EEE is used on the spot of the day of the week part, What's the meaning EEE? stackoverflow.com