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 subprocess | |
import os | |
# sample of input_file: | |
# $\mathbf{x}\in \mathbb{R}^d$ | |
# $x_i\in \mathbb{R}$ | |
# $D=\{\mathbf{x}^{(1)},\mathbf{x}^{(2)},\ldots, \mathbf{x}^{(N)}\}$ | |
# ... | |
# consts |
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
//run on console on https://www.justwatch.com/ | |
//other usages are on https://github.com/Fredwuz/node-justwatch-api etc. | |
var query = '진격의 거인'; | |
var locale = 'ko_KR'; | |
var endpoint = '/titles/'+locale+'/popular'; | |
var url = 'https://apis.justwatch.com/content' + endpoint; | |
var params = { | |
fields: ['id', 'title', 'object_type', 'original_release_year', 'scoring', 'full_path', 'external_ids', 'original_title'], |
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
(async () => { | |
const selector = 'div#artifacts table a.Link--primary'; | |
const romEl = await elementReady_(selector); | |
const romFilename = romEl.innerText; | |
const proxyPrefix = 'https://nightly.link/'; | |
const orgUrl = document.URL; //ex: https://github.com/pdpdds/kingsvalley/actions/runs/3908859118 | |
const newUrl = orgUrl.replace('https://github.com/', proxyPrefix) + '/' + romFilename + '.zip'; | |
const webMSXPrefix = 'https://webmsx.org/?ROM='; |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
# 1. rename mds to be ordered (use a tool like Advanced Renamer) | |
# 2. run this file to merge mds to one md | |
# 3. run pandoc to convert md to docx with my filter (increase_header_level.py) | |
# 4. in word, find ?#n headers and apply appropriate styles | |
# standalone preprocessor for md files from wikidocs | |
import os | |
Path = "./" | |
filelist = os.listdir(Path) |
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
SPACE = 0.3 # em | |
[START, END] = [1, 7] # assuming positive integers | |
MID = round((END - START + 1)/2) | |
STR = ''.join(list(str(i) for i in range(START, END + 1))) | |
html = '<html><head><style>p {margin: 0;}</style></head><body>' | |
padding = 0 | |
for i in range(START, END + 1): | |
html += '<p style="padding-left: ' + str(padding * SPACE) + 'em;">' + STR[padding:len(STR) - padding] |
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
-9 | |
-9 | |
-9 | |
-8 | |
-7 | |
-6 | |
-4 | |
-3 | |
-2 | |
-1 |
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
// MIT Licensed | |
// Author: jwilson8767 | |
/** | |
* Waits for an element satisfying selector to exist, then resolves promise with the element. | |
* Useful for resolving race conditions. | |
* | |
* @param selector | |
* @returns {Promise} | |
*/ |
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
/*--- waitForKeyElements(): A utility function, for Greasemonkey scripts, | |
that detects and handles AJAXed content. | |
Usage example: | |
waitForKeyElements ( | |
"div.comments" | |
, commentCallbackFunction | |
); |
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() { | |
var inputUrls = ['https://same.origin.pages', ...]; //input | |
var result = []; //global var for output | |
getTextFromUrls(inputUrls); | |
function getTextFromUrls(urlArray) { | |
var urls = urlArray.slice(); | |
asyncFetch(urls.pop()); | |
function asyncFetch(url) { |
NewerOlder