- javascript:alert(origin)
- @maple3142
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
(await Promise.all([1,2,3].map(x=>fetch(`https://tieba.baidu.com/p/5626879744?pn=${x}`).then(r=>r.text())))).filter((x,i)=>parseInt($(x).find('.tP')[0].textContent)===i+1).map(x=>$(x).find('.d_post_content').toArray().reduce((d,x)=>{ | |
const div=document.createElement('div') | |
div.innerHTML=x.innerHTML.replace(/<br>/g,'\n').replace(/</g,'<').replace(/>/g,'>') | |
if(div.textContent.replace(/(\n| )/g,'').length>=50&&!div.textContent.includes('广告')&&!div.textContent.includes('免费'))return d+'\n'+div.textContent | |
else return d | |
},'').trim()).join('\n\n') |
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
(function(global) { | |
'use strict' | |
const pjax={} | |
pjax._get=url=>{ | |
return new Promise((res,rej)=>{ | |
const xhr=new XMLHttpRequest() | |
xhr.open('GET', url) | |
xhr.onload=()=>res([xhr.responseText,xhr]) | |
xhr.onerror=rej | |
xhr.send() |
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 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() |
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
// outdated | |
// please heads for https://github.com/maple3142/ytdl | |
const axios = require('axios') | |
const parseQuery = s => { | |
const o = s | |
.split('&') | |
.map(x => x.split('=')) | |
.reduce((p, c) => { |
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
# 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] |
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
#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; |
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
#include <iostream> | |
#include <sstream> | |
#include <cstring> | |
#include <iomanip> | |
#include <algorithm> | |
using namespace std; | |
typedef unsigned long long int ll; | |
const int basecnt = 7; |
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 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 検索機能強化 |