This file contains hidden or 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
// 取得頁面上的初始文字 | |
var targetDom = document.querySelector("main"); | |
var initialText = targetDom.innerText; | |
// 設定一個定時器,定期檢查頁面上的文字是否有變化 | |
setInterval(function() { | |
// 取得目前的文字 | |
var currentText = targetDom.innerText; | |
This file contains hidden or 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
# (C) Kyle Kastner, June 2014 | |
# License: BSD 3 clause | |
import scipy.stats as st | |
import numpy as np | |
class gmmhmm: | |
#This class converted with modifications from https://code.google.com/p/hmm-speech-recognition/source/browse/Word.m | |
def __init__(self, n_states): | |
self.n_states = n_states |
This file contains hidden or 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
let speech = new SpeechSynthesisUtterance(); | |
speech.lang = "en"; | |
speech.text = "hello kit"; | |
speechSynthesis.speak(speech); |
This file contains hidden or 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
/** list pages */ | |
var href_lists = document.querySelectorAll(".spoilerbody")[2].querySelector("td").querySelectorAll("a"); | |
var url_replace = "/files/all?filter-game-version=2020709689%3A6756"; | |
href_lists.forEach(function(v){ | |
v.href = v.href + url_replace; | |
v.click(); | |
}); |
This file contains hidden or 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
FROM openjdk:8 | |
MAINTAINER Lewis | |
WORKDIR /server | |
RUN apt update | |
RUN apt install -y zip unzip htop apache2 openssh-server |
This file contains hidden or 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 numpy as np | |
# f(x, y) return this array | |
data = np.array([ | |
[3, 6, 4, 2], | |
[1.1, 0.5, 0.1, 0.9], | |
[4, 0.3, 2.3, 8.9] | |
]) | |
x = {"1.1": data[0], "4.2": data[1], "-3": data[2]} |
This file contains hidden or 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
# touch at x 534 2212 | |
adb shell input tap 534 2212 | |
# get now screen | |
adb exec-out screencap -p > screen.png |
This file contains hidden or 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
def wait_and_click(image): | |
wait(image) | |
click(image) | |
def try_execute(try_times, execute_function, fail_execute_function): | |
for i in range(try_times): | |
try: | |
execute_function() | |
break | |
except: |
This file contains hidden or 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
#!/bin/bash | |
## Usage: | |
## 1. Download the modpack zip from CurseForge | |
## 2. Extract zip to where you want your modpacks game directory to be (e.g. ~/minecraft/modpack/gamedir) | |
## 3. In terminal, run this script in your chosen game directory | |
## If successful, it should print out which mods its downloading, until it is done | |
## 4. Create an "Installation" in the Vanilla Minecraft Launcher | |
## * Version should be set to the correct modded minecraf version installed (eg. 1.16.4-forge-35.1.13) | |
## * Make sure you are running the correct java version, and are giving an appropriate amount of RAM |
This file contains hidden or 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
docker exec 容器id psql 資料庫名稱 -U 使用者 -c "\d" |