This file contains 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
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 |
This file contains 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 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 |
This file contains 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
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 |
This file contains 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
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 |
This file contains 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
################# | |
# configs # | |
################# | |
HDLOC=/dev/sda | |
UEFISIZE=250M | |
ROOTSIZE=32G | |
SWAPSIZE=16G | |
ROOTPASS=root | |
USERNAME=zxc |
This file contains 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
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[^"]*' | \ |
This file contains 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
// 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); |
This file contains 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
#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); | |
} |
This file contains 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 | |
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], |
NewerOlder