Skip to content

Instantly share code, notes, and snippets.

View maple3142's full-sized avatar

maple maple3142

  • Taiwan
  • 14:33 (UTC +08:00)
  • X @maple3142
View GitHub Profile
const rotate = ar => ar[0].map((col, i) => ar.map(row => row[i]))
const check = board => {
const board2 = rotate(board)
const row_ok = board.every(row => new Set(row).size === row.length)
const col_ok = board2.every(row => new Set(row).size === row.length)
const block_ok = (() => {
for (let i = 0; i < 3; i++) {
for (let j = 0; j < 3; j++) {
const s = new Set()
# https://blog.gtwang.org/statistics/tensorflow-google-machine-learning-software-library-tutorial/
# 移除警告
import os
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2'
# y=2x+1
x_data=[1,2,3,4,5]
y_data=[3,5,7,9,11]
@maple3142
maple3142 / custom.css
Created May 20, 2018 09:37
cent browser new tab chrome style search box
#ntp-search-container{
padding: 0px;
margin: 0px !important;
left: 0px;
bottom: 0px;
width: 100% !important;
height: 100% !important;
display: flex;
justify-content: center;
align-items: center;
@maple3142
maple3142 / aria2.conf
Last active May 6, 2024 16:44
aria2 on Windows configuration
rpc-secret=maple3142
enable-rpc=true
rpc-allow-origin-all=true
rpc-listen-all=true
max-concurrent-downloads=5
continue=true
max-connection-per-server=16
min-split-size=10M
split=10
max-overall-download-limit=0
#include <iostream>
#include <sstream>
#include <cstring>
#include <iomanip>
#include <algorithm>
using namespace std;
typedef unsigned long long int ll;
const int basecnt = 7;
// ==UserScript==
// @name Patchouli
// @name:en Patchouli
// @name:ja パチュリー
// @name:zh-CN 帕秋莉
// @name:zh-TW 帕秋莉
// @namespace https://github.com/FlandreDaisuki
// @description An image searching/browsing tool on pixiv
// @description:en An image searching/browsing tool on pixiv
// @description:ja pixiv 検索機能強化
@maple3142
maple3142 / README.md
Last active October 5, 2018 14:49
Traditional Chinese Office 365 pro customized installation configuration
@maple3142
maple3142 / appsscript.json
Last active October 13, 2018 08:45
BahamutQA Api
{
"timeZone": "Asia/Taipei",
"dependencies": {
},
"webapp": {
"access": "ANYONE_ANONYMOUS",
"executeAs": "USER_DEPLOYING"
},
"exceptionLogging": "STACKDRIVER",
"executionApi": {
const rand = (min, max) => Math.floor(Math.random() * (max + 1 - min) + min)
const gen = (n, split = rand(0, 1)) => {
if (n === 0) return rand(0, 1)
return split
? [2]
.concat(gen(n - 1))
.concat(gen(n - 1))
.concat(gen(n - 1))
.concat(gen(n - 1))
: [rand(0, 1)]
48 65 61 76 65 6e 20 2630 0a 0a 45 61 72 74 68 20 2637
0a 0a 46 69 72 65 20 2632 0a 0a 57 61 74 65 72 20 2635
0a 0a 6f 65 71 58 75 65 59 41 56 53 38 0a 0a 2191 2192
20 2193 2192 20 2193 2190 20 2191 2190 0a 0a 48 61 6c
66 20 77 61 79 20 74 68 65 72 65 20 3a 5d