Skip to content

Instantly share code, notes, and snippets.

@thsunkid
thsunkid / slack_archiver.py
Last active June 4, 2023 11:26
Slack Channel Archiver Script
import datetime
from slack_sdk import WebClient
"""Get the SLACK_API_TOKEN:
1. To get a token for this script, create an app at https://api.slack.com/apps (Choose 'From scratch')
2. Go to 'OAuth & Permissions' > 'Scopes' section > 'User Token Scopes' > Add these permissions:
# admin.conversations:write
# admin.conversations:read
# channels:read
# channels:history
@thsunkid
thsunkid / gwnet.py
Last active September 5, 2021 15:11
XLA compilation error for TPU sample code
import os
import math
import time
import random
import numpy as np
import pandas as pd
import torch
import torch.nn as nn