I hereby claim:
- I am wangyihang on github.
- I am wangyihang (https://keybase.io/wangyihang) on keybase.
- I have a public key ASAgocxodMp98MAOht9nFCua-961GQ0TSG_HjU7IceBnsAo
To claim this, I am signing this object:
import math | |
import random | |
import matplotlib.pyplot as plt | |
def generate_candidates(M): | |
r = list(range(M)) | |
random.shuffle(r) | |
return r | |
def percent_n_in_m_rule(N, M): |
; Calculate the root of an equation using numerical computation | |
; (scheme is hard to write :( | |
; 2022-01-23 | |
; Yihang Wang <wangyihanger@gmail.com> | |
(define (same-sign? a b) (or (and (>= a 0) (>= b 0)) (and (<= a 0) (<= b 0)))) | |
(define (average a b) (/ (+ a b) 2)) | |
(define (abs x) (cond | |
((< x 0) (- x)) | |
((= x 0) 0) |
upstream jupyter-notebook { | |
server localhost:8888; | |
} | |
server{ | |
listen 8080; | |
server_name notebook.example.com; | |
location / { | |
proxy_pass http://jupyter-notebook; |
''' | |
Solution for XOR challenge (http://scz.617.cn:8/misc/202007101723.txt) | |
''' | |
from termcolor import colored | |
from colorama import init | |
import string | |
import math | |
import shlex |
#include <signal.h> | |
#include <stdarg.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <sys/prctl.h> | |
#include <sys/stat.h> | |
#include <sys/types.h> | |
#include <syslog.h> | |
#include <unistd.h> |
from sys import version | |
import semver | |
import requests | |
import itertools | |
from bs4 import BeautifulSoup | |
def md5(data): | |
if type(data) is str: | |
data = bytes(data, encoding='utf-8') | |
return __import__('hashlib').md5(data).hexdigest() |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <unistd.h> | |
/** | |
* BrainFuck Interpreter in C [1-2] | |
* Wang Yihang <wangyihanger@gmail.com> | |
* | |
* == Run |
from __future__ import print_function | |
import frida | |
import sys | |
device = frida.get_device_manager().add_remote_device('127.0.0.1:27042') | |
session = device.attach(int(sys.argv[1])) | |
code = ''' | |
Interceptor.attach(Module.findExportByName("libssl-ws.so", "tls1_setup_key_block"), { | |
onEnter: function(args) { |
import random | |
def solve(): | |
''' | |
area of unit circle at (0.5, 0.5) = pi * (0.5 ^ 2) | |
area of unit trangle at (0.5, 0.5) = 1 * 1 | |
the ratio of the number of points that fall in the circle to the number | |
of all points will approximate the ratio of the area of the circle to | |
the area of the entire square. | |
''' |
I hereby claim:
To claim this, I am signing this object: