Skip to content

Instantly share code, notes, and snippets.

View nobodyzxc's full-sized avatar
🎯
making my toy

zxchen nobodyzxc

🎯
making my toy
View GitHub Profile
@nobodyzxc
nobodyzxc / rate_fetch.c
Last active July 30, 2016 06:12
python scrapy files
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
char str[1000];
int back(char *tail){
char *head;
for(head = tail ; ; head--)
if(*head == ';' || *head == '>')
break;
@nobodyzxc
nobodyzxc / sendMP.c
Created August 19, 2016 14:47
Wake On Wan
//code reference https://shadesfgray.wordpress.com/2010/12/17/wake-on-lan-how-to-tutorial/
//thx to Shades of Gray's blogger !
//I made some changes and make wol to wow by setting my router.
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#include<sys/socket.h>
#include<sys/types.h>
//改自 如何用C语言画一个“心形”? - Milo Yip 的回答
//https://www.zhihu.com/question/20187195/answer/34873279
//来个 g++ linux 支援控制代码 改丑了不要找我,不喜勿喷 <(_ _)>
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <unistd.h>
#include <signal.h>
float f(float x, float y, float z) {
float a = x * x + 9.0f / 4.0f * y * y + z * z - 1;
#!/usr/bin/env python2.7
import urllib2 , io
from HTMLParser import HTMLParser
####################### SETTING ########################
bank_url = "http://rate.bot.com.tw/xrt?Lang=zh-TW"
####################### PAESER IMPLEMENT ###############
class rateParser(HTMLParser):
@nobodyzxc
nobodyzxc / oj.vim
Last active October 13, 2017 08:00
source /etc/vimrc
set nu "num line
set tabstop=4
set shiftwidth=4
set cindent
set smarttab
set expandtab "set tab to space
set autoindent
syntax on
"hi comment ctermfg=cyan
@nobodyzxc
nobodyzxc / PL-assignment4-template.hs
Created April 10, 2018 03:05
Template for PL assignment4
-- 1.
type Name = [Char]
data Expr = Var Name
| Lit Int
| Expr :+: Expr
| Expr :*: Expr
deriving (Eq, Show)
global = [("x", 1), ("y", 2)] :: [(Name, Int)]
@nobodyzxc
nobodyzxc / result.txt
Created January 20, 2019 20:57
Remix Unit Tests
◼ MyTest
[02:35:23] payload method is eth_gasPrice
[02:35:23] payload method is eth_sendTransaction
[02:35:23] payload method is eth_getTransactionReceipt
[02:35:23] payload method is eth_gasPrice
[02:35:23] payload method is eth_sendTransaction
[02:35:23] payload method is eth_getTransactionReceipt
[02:35:23] payload method is eth_gasPrice
[02:35:23] payload method is eth_sendTransaction
[02:35:23] payload method is eth_getTransactionReceipt
APK="$1"
if [ -f $APK ];then
./apktool d "$APK"
OIFS="$IFS"
IFS=$'\n'
grep -lR "\->loadAd" "${APK%.*}" | xargs -d '\n' -- sed -i '/\->loadAd/d'
IFS="$OIFS"
./apktool b "${APK%.*}" -o "${APK%.*}_no_ad.apk"
java -jar sign.jar --overwrite --apks "${APK%.*}_no_ad.apk"
rm -rf "${APK%.*}"
@nobodyzxc
nobodyzxc / convolution.py
Last active March 26, 2019 09:51
convolution implementation for CV
import numpy as np
import cv2, sys, os.path
from itertools import chain
from functools import reduce
kernel = "smooth"
filename = "demo.png"
kernels = {
"blur" : [[5/80,1/8,5/80],
#include<cstdio>
#define LL long long
bool go_tree(LL tar, LL cur, bool &isNIL){
LL val;
bool res = false, ll = false, rl = false;
if(scanf("\n(%lld", &val)){
res |= go_tree(tar, cur + val, ll);
res |= go_tree(tar, cur + val, rl);
res |= (ll && rl && tar == cur + val);
}