Skip to content

Instantly share code, notes, and snippets.

View yuya-maemichi-synspective's full-sized avatar
🛰️
spaced out

Yuya Maemichi yuya-maemichi-synspective

🛰️
spaced out
View GitHub Profile

minor problems

Python packages

  • pandas-gbq should not bundle setuptools as a runtime dependency
@yuya-maemichi-synspective
yuya-maemichi-synspective / interval.py
Created March 13, 2025 02:33
math complementable interval in Python
from __future__ import annotations
from dataclasses import dataclass, replace
import math
from numbers import Number
from typing import Tuple
NEG_INF = -math.inf
POS_INF = math.inf
@dataclass(frozen=True)
import unittest
class RandomTestLoader(unittest.TestLoader):
@staticmethod
def sortTestMethodsUsing(_a, _b):
from random import choice
return choice((-1, 0, 1))
@yuya-maemichi-synspective
yuya-maemichi-synspective / URL-pageState.sh
Last active June 20, 2024 03:23
Google Cloud snippets
pbpaste |
ruby -r{uri,cgi} -lpe'$_=CGI.parse(URI($_).query)["pageState"][0]' |
nkf --url-input |
tr '()' '{}' |
jq -rc '..|strings' |
sed -E 's/_([[:xdigit:]]{2})/%\1/g' |
nkf --url-input |
jq '.'
tr -s '[:space:]' '[-*]'

list

  • adding a bot user to a channel

    1. hover the mouse cursor to the bot user name @bot-user-name.
    2. select "Add this app to a channel…".
    3. select the channel from the drop-down list.
  • adding a webhook to a channel without reinstalling

    1. open the app building page under https://api.slack.com/apps/
    2. open the webhook page; e.g.,
*
異常検知のための未来予測:オウム返し的手法からHolt-Winters
Methodまで
アイテムの種類 ウェブページ
著者名 たくち
抄録 Holt-Winters Method(別名: Triple Exponential Smoothing)とい
うデータの予測手法がある。これについて素晴らしい解説記事があるので読
document.querySelector`body > .versions > .list > .other > a`.click()
y = 2024
t0 = Time.new(y)
year_seconds = Time.new(y + 1) - t0
c = 100
c.times.map { t0 + (year_seconds / c * _1) }
find ~ \
-path "$HOME/.Trash" -prune -or \
-path "$HOME/Library" -prune -or \
-path '*/node_modules' -prune -or \
-path '*/.idea/*.iml' -type f -print