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 / google-tips
Created July 14, 2022 19:01 — forked from qwo/google-tips
Google Recruiter Candidate Tips ..
xxx,
Thanks again for taking the time to speak with me and for sending me your information. I'm excited to tell you that we would like to move forward in the process!
One of our coordinators will be emailing you within the next week from an @google.com domain with the date and time of your phone interview. In the meantime, I've included some preparation materials (below.)
Please note this will be a technical interview that will last for approximately 45 minutes. Google takes an academic approach to the interviewing process. This means that we are interested in your thought process, your approach to problem solving as well as your coding abilities. You may be asked questions that relate to technical knowledge, algorithms, coding, performance, how to test solutions, and perhaps your interest in Google products. The best advice that I can give you is to treat the interview like a conversation, talk through the problems, and please feel free to ask the interviewer if you are not clear with any of the questio

BotScript (浪語) 的 Example code

import codecs, csv, sys, os
def extract(text, head, tail):
beg = text.find(head)
offset = text[beg + len(head):].find(tail)
return text[beg + len(head):beg + len(head) + offset]
def interpolate(x0, y0, x1, y1, x2):
# (x1 - x0) / (x2 - x0) = (y1 - y0) / (y2 - y0)
y2 = (y1 - y0) / ((x1 - x0) / (x2 - x0)) + y0
@nobodyzxc
nobodyzxc / Makefile
Last active April 26, 2020 21:20
A Graph Problem
all:
g++ new.cc -o sta -pthread
@#g++ old.cc -o org -pthread
g++ try.cc -o dev -pthread
clean:
rm -rf dev org sta
format:
clang-format -i *.cc
USB= # /dev/sdc
BOOTSIZE= # 1G
FAT32= # b # hex code in fdisk
exFAT= # 7 # hex code in fdisk
ISO= # archlinux-version-x86_64.iso # iso path
# VAR declar must be connected. ex: USB=/dev/sdc
if [ ! -n "$USB" ];then echo "please set USB" && exit; fi
if [ ! -n "$BOOTSIZE" ];then echo "please set BOOTSIZE" && exit; fi
if [ ! -n "$FAT32" ];then echo "please set FAT32" && exit; fi
#################
# configs #
#################
HDLOC=/dev/sda
UEFISIZE=250M
ROOTSIZE=32G
SWAPSIZE=16G
ROOTPASS=root
USERNAME=zxc
@nobodyzxc
nobodyzxc / download_from_gdrive.bash
Last active May 15, 2020 08:56 — forked from afunTW/download_from_gdrive.bash
download the file on google drive (both small and large file)
download_from_gdrive() {
file_id=$1
file_name=$2 # first stage to get the warning html
curl -L -o $file_name -c /tmp/cookies \
"https://drive.google.com/uc?export=download&id=$file_id"
if grep "Virus scan warning" $file_name > /dev/null;then
# second stage to extract the download link from html above
download_link=$(cat $file_name | \
grep -Eo 'uc-download-link" [^>]* href="[^\"]*' | sed 's/\&/\&/g' | sed 's/.*href="\(.*\)/\1/')
#grep -Po 'uc-download-link" [^>]* href="\K[^"]*' | \
@nobodyzxc
nobodyzxc / repeat_drrr.js
Last active April 27, 2019 06:51
for Drrr
// press F12 and click the console, paste the code below to the console, then enter.
var ordering = false;
var order_song = function (name) {
return function(link){
ordering = true;
console.log('lnk is:')
console.log(link);
$('#form-room-music-url').val(link);
$('#form-room-music-name').val(name);
#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);
}
@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],