- https://api.slack.com/apps
- Create New App
- Set App Name and Development Slack Workspace
- Tap App to move Building Apps for Slack
- Add features and functionality
- Select Incoming Webhooks
- Add New Webhook to Workspace
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
# 命令書 | |
あなたはシニアソフトウェアエンジニアです。 | |
以下の制約条件と入力文をもとに改善されたコードおよびテストのためのコードを出力してください。 | |
# 制約条件 | |
- コードを変える場合は、その理由を説明する | |
- [X]を日本語とする | |
- 適切にGoogle Styleの[X]でdocstringを追加する |
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
def setup_vpc(self): | |
self.vpc = aws_ec2.Vpc( | |
self, | |
"efs-testvpc", | |
nat_gateways=0, | |
subnet_configuration=[ | |
aws_ec2.SubnetConfiguration( | |
name="efs-testsubnet-public", | |
subnet_type=aws_ec2.SubnetType.PUBLIC, | |
), |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 | |
from urllib.request import urlopen | |
from urllib.request import Request | |
from urllib.parse import urlencode | |
# set username, password, auth_url, api_url | |
params = urlencode({"username": username, "password": password}).encode() | |
# get token |
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 shutil | |
import tempfile | |
from app.models import Record | |
# %% | |
%%time | |
with tempfile.NamedTemporaryFile() as tmp: | |
record = Record.objects.first() |
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 shutil | |
import requests | |
def download(url, dst): | |
response = requests.get(url, stream=True) | |
with open(str(dst), 'wb') as out_file: | |
shutil.copyfileobj(response.raw, out_file) | |
del response |
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
(function() { | |
var language_info = { | |
languages_top: [ | |
{ code: "de", name: "Deutsch" }, | |
{ code: "en", name: "English", checked: true }, | |
{ code: "es", name: "español" }, | |
{ code: "es-419", name: "español (Latinoamérica)" }, | |
{ code: "fr", name: "français" }, | |
{ code: "hr", name: "hrvatski" }, | |
{ code: "it", name: "italiano" }, |
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
# install node & npm | |
apt-get install -y nodejs npm apt-transport-https | |
npm cache clean | |
npm install n -g | |
n stable | |
ln -sf /usr/local/bin/node /usr/bin/node | |
ln -sf /usr/local/bin/npm /usr/bin/npm |
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 seaborn as sns | |
colorDict = {} | |
palette = "hls" | |
colorPalette = sns.color_palette(palette, len(allLabels)) | |
for i, label in enumerate(allLabels): | |
colorDict[label] = colorPalette[i] |
NewerOlder