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 os | |
import random | |
import time | |
import json | |
import math | |
from typing import Iterable, List, Set, Tuple | |
from urllib.request import urlopen | |
# ゲームサーバのアドレス / トークン | |
GAME_SERVER = os.getenv('GAME_SERVER', 'https://contest.2021-autumn.gbc.tenka1.klab.jp') |
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
const $ = (selector: string): HTMLElement => document.querySelector(selector)! | |
const $$ = (selector: string): HTMLElement[] => | |
Array.from(document.querySelectorAll(selector)) | |
type Coord = { x: number; y: number } | |
type Nyan = { pos: Coord; point: number } | |
const plusCoord = (pos1: Coord, pos2: Coord): Coord => { | |
return { x: pos1.x + pos2.x, y: pos1.y + pos2.y } | |
} |
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
// ==UserScript== | |
// @name toggl project name extractor | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description Toggl にプロジェクト名コピーボタンを生やす | |
// @author t.katsushima | |
// @match https://track.toggl.com/timer | |
// @icon https://www.google.com/s2/favicons?domain=toggl.com | |
// @grant GM.setClipboard | |
// ==/UserScript== |
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
use std::fs; | |
use std::io::Write; | |
#[derive(Clone)] | |
struct Graphics { | |
screen_w: f64, | |
screen_h: f64, | |
data: String, |
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
// Digital Shift Sisisin の操作AI | |
// | |
// 座標は { x: number; y: number } で表現する | |
// x座標は右がプラス、y座標は下がプラス | |
// sisisinのy座標は常に0 | |
// フィールドオブジェクトElement達の取得 | |
const rocks = document.getElementsByClassName('rock') | |
const p1chips = document.getElementsByClassName('point') | |
const p10chips = document.getElementsByClassName('daisuke') |
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
// ==UserScript== | |
// @name esa 除外フィルタ | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description . | |
// @author @Gobi03 | |
// @match https://opt-technologies.esa.io/members/* | |
// @match https://opt-technologies.esa.io/* | |
// @grant none | |
// ==/UserScript== |
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
// ==UserScript== | |
// @name kintai-automator | |
// @namespace http://tampermonkey.net/ | |
// @version 0.2 | |
// @description . | |
// @author https://github.com/Gobi03 | |
// @match https://opthd--teamspirit.visualforce.com/apex/AtkWorkTimeView?sfdc.tabName=01r100000001yyc | |
// @grant none | |
// ==/UserScript== |
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
#!/usr/bin/env python3 | |
""" | |
辺をランダムに取得し、点数を計算するサンプルプログラムです。 | |
実行には python3 環境が必要です。 | |
TOKEN 変数を書き換えて実行してください。 | |
""" | |
import heapq | |
import queue |
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 java.util.Scanner | |
import scala.xml.XML | |
import scala.collection.mutable.{PriorityQueue, Set} | |
import scala.util.control.Breaks.{breakable,break} | |
import Math.abs | |
/** <div.board> を入力として与える **/ | |
object Main extends App with Tools { |
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 java.util.Scanner | |
import scala.xml.XML | |
import scala.collection.mutable.Queue | |
import scala.util.control.Breaks.{breakable,break} | |
/** <div.board> を入力として与える **/ | |
object Main extends App with Tools { | |
override val H = 4 |
NewerOlder