Skip to content

Instantly share code, notes, and snippets.

from sympy import *
n, y, u = symbols('n y u')
M = Matrix([[-1*n*y, n*y], [u, -u-(n-1)*y]])
Mt = M.transpose()
X=Matrix([[1,1]])
Y=Matrix([1,0])
m = -X.multiply(Mt.inv()).multiply(Y)
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
profile = webdriver.FirefoxProfile()
profile.accept_untrusted_certs = True
driver = webdriver.Firefox(firefox_profile=profile)
#driver.get("https://10.240.129.198:8443/")
#elem = driver.find_element_by_id("viewer")
#elem.click()
@limingzju
limingzju / getdents.stp
Created May 27, 2021 11:48
getdents trace
probe begin
{
log("begin to probe")
}
probe syscall.getdents {
/* process id 123 */
if (pid() == 123) {
file = @cast(task_current(), "task_struct")->files->fdt->fd[$fd]
if (!file)
@limingzju
limingzju / strace.stp
Last active May 28, 2021 02:45
strace.stp
#!/usr/bin/stap
// stap -k -v strace.stp
// https://sourceware.org/systemtap/examples/#process/strace.stp
# suppress some run-time errors here for cleaner output
//bin/true && exec stap --suppress-handler-errors --skip-badvars $0 ${1+"$@"}
/* configuration options; set these with stap -G */
global follow_fork = 0 /* -Gfollow_fork=1 means trace descendant processes too */
global timestamp = 1 /* -Gtimestamp=0 means don't print a syscall timestamp */