Skip to content

Instantly share code, notes, and snippets.

View motoki317's full-sized avatar
🏠
Working from home

motoki317 motoki317

🏠
Working from home
View GitHub Profile
@motoki317
motoki317 / main.go
Last active March 13, 2021 12:07
Mandelbrot Set
package main
import (
"fmt"
"github.com/lucasb-eyer/go-colorful"
"github.com/schollz/progressbar/v3"
"image"
"image/color"
"image/png"
"math"
# from traq-message-indexer messages cache
SELECT c.name AS "channel_name", u.name AS "related_user_name", COUNT(*) AS "messages_count" FROM message m
# restrict to times messages
INNER JOIN channel c ON m.channel_id = c.id
INNER JOIN user u ON m.user_id = u.id
# drop own messages in their own times
WHERE u.name != c.name
# drop bot relations
AND NOT u.bot
GROUP BY m.channel_id, m.user_id
@motoki317
motoki317 / main.js
Last active September 19, 2021 14:22
Quine-McCluskey Algorithm in JavaScript
const product = (s1, s2) => s1.flatMap(elt1 => s2.map(elt2 => [...elt1, ...elt2]));
const power = (s, p) => new Array(p).fill(s).reduce(product, [[]]);
const bool = [[0], [1]];
const and = (...x) => {const base = (x, y) => x * y; return x.reduce(base, 1)};
const or = (...x) => {const base = (x, y) => x + y - x * y; return x.reduce(base, 0)};
const xor = (...x) => {const base = (x, y) => x + y - 2 * x * y; return x.reduce(base, 0)};
const nand = (...x) => 1 - and(...x);
const dual_func = f => (...x) => (v => v === '*' ? '*' : 1 - v)(f(...x.map(t => 1 - t)));
@motoki317
motoki317 / foobar_4_2.java
Created January 17, 2021 02:44
Google FooBar challenge 4-2 Maximum Cardinality Matching
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashSet;
import java.util.List;
import java.util.Objects;
import java.util.Set;
import java.util.StringTokenizer;
import java.util.stream.Collectors;
import java.util.stream.Stream;
@motoki317
motoki317 / Solution.java
Created January 19, 2021 09:31
Google FooBar challenge 5-1 Reverse Game of Life one step
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Set;
import java.util.StringTokenizer;
@motoki317
motoki317 / sudoku_solver.go
Created January 20, 2021 00:59
sudoku_solver.go 2020/2/26
package main
import (
"bufio"
"fmt"
"os"
"strings"
"strconv"
"sync"
"time"
@motoki317
motoki317 / main.go
Created February 18, 2021 12:52
小町算
package main
import (
"errors"
"fmt"
"math"
"sort"
"strconv"
)
@motoki317
motoki317 / main.go
Last active September 19, 2021 14:15
水素の音
package main
import (
"fmt"
"github.com/go-audio/audio"
"github.com/go-audio/wav"
"math"
"os"
)

ISUCON11 本選当日マニュアル

スケジュール

  • 10:00 競技開始
  • 17:00 リーダーボードの更新停止
  • 18:00 競技終了
  • 翌 18:00 結果発表イベント開始

課題アプリケーション ISUCHOLAR について

ISUCHOLAR アプリケーションマニュアル

logo

ISUCHOLAR について

本学では、学内システム ISUCHOLAR が使用されています。 科目の履修から課題の提出、成績の処理まで学内の全業務に用いられる ISUCHOLAR ですが、すべてが重いと学生や教員から多くの不満が寄せられています。 システム担当者は明後日から始まる新年度に向けて ISUCHOLAR の改修を依頼しましたが、巡り巡ってあなたに許された時間は 8 時間しかないようです。 なんとか期限までに ISUCHOLAR を改善し、素敵なキャンパスライフを提供しましょう!