Skip to content

Instantly share code, notes, and snippets.

View Colk-tech's full-sized avatar
🤒
Always sick

ITO Manaki (Colk) Colk-tech

🤒
Always sick
View GitHub Profile
"""
discord botをかんたんに作れるテンプレート
Reference↓
https://discordpy.readthedocs.io/ja/latest/api.html
"""
import asyncio
import os
import sys
import discord
           / iiii i ヽ、、
            /ゞ、i!llllliii川//ヽ、
           /ミ〃      〃彡ヽ
          lミミ        彡彡}
          lミミ,r‐-、 ,,r─、 彡彡ll|
          iミミ ィェx   ,rェt  彳彡!
           ',   .:       9}"
            !   ::,、,、    l_丿
            ',  _,_   /、
            rゝ  =   ノi!ヽト、
import os
import datetime
import shutil
DESKTOP_PATH = os.getenv("USERPROFILE") + r"\Desktop"
BACKUP_PATH = os.getenv("ESCAPE-FOLDER")
folder_name = BACKUP_PATH + r"/" + datetime.datetime.now().strftime("%Y%m%d%H%M%S")
#!/bin/sh
/Applications/Discord.app/Contents/MacOS/Discord --proxy-server=http://po.cc.ibaraki-ct.ac.jp:3128
@Colk-tech
Colk-tech / average_information_content.py
Created October 8, 2020 06:53
授業で即興で書いた平均情報量を求めるやつです
import math
def amount_of_information(expectation_value: float, probability: float) -> float:
retval = expectation_value * math.log2(1.0/probability)
return retval
events = {"sunny": 0.40, "cloudy": 0.30, "rainy": 0.30}
@Colk-tech
Colk-tech / yubisuma.c
Created November 5, 2020 05:56
授業のために作ったかなりクソコードな指スマです
int main(void) {
int is_cpu_turn;
int default_fingers;
int game_end_flag = 0;
int user_left_fingers;
int user_raise_fingers;
int user_declared_number;
int cpu_left_fingers;
@Colk-tech
Colk-tech / questioner.py
Created November 12, 2020 09:19
@isso0424 くんの化学のやつにバリデート機能をつけたパッチです (isso0424/vs_chemistry_weapon)
"""
Question interprinter
"""
from src.types.question import Question
class Questioner:
"""
Question proposing interprinter
"""
@Colk-tech
Colk-tech / Keybase Proof
Created December 5, 2020 10:23
Keybase Proof
### Keybase proof
I hereby claim:
* I am colk-tech on github.
* I am colk_ (https://keybase.io/colk_) on keybase.
* I have a public key ASCiTdC5yZ5DC-LOng8lJnsPfIf1gcS4WEQ-kK7yOLCk2go
To claim this, I am signing this object:
@Colk-tech
Colk-tech / configmsg.yml
Created December 18, 2020 16:07
MinecraftのサーバープラグインであるAuto Save Worldのメッセージ日本語化
broadcast:
pre: '&9セーブします...'
post: '&9セーブが完了しました'
broadcastbackup:
pre: '&9バックアップします...'
post: '&9バックアップが完了しました'
broadcastpurge:
pre: '&9データをパージします...'
post: '&9データのパージが完了しました'
autorestart:
@Colk-tech
Colk-tech / messages.yml
Created December 18, 2020 16:14
Minecraftのサーバープラグインである1vs1のメッセージ日本語化
alreadyInQueue: '&cYou are already in the queue of arena &6{ARENA}&a. Number: &6{NUMBER}'
notInQueue: '&cYou are not in a queue'
leaveQueue: '&aYou left the queue of arena &6{ARENA}'
joinQueue: '&aYou are in the queue of arena &6{ARENA} &anow. Number: &6{NUMBER}'
setSpawn1: '&6Spawn 1 &asuccessfully set in arena &6{ARENA}'
setSpawn2: '&6Spawn 2 &asuccessfully set in arena &6{ARENA}'
winAnnounce: '&c{WINNER} &abeat &2{LOSER} &ain arena &6{ARENA}'
winAnnounce: '&c{WINNER} &abeat &2{LOSER} &ain arena &6{ARENA}'
alreadyInArena: '&cYou are already in the arena &6{ARENA}'
reload: '&aConfiguration reloaded!'