Skip to content

Instantly share code, notes, and snippets.

View zarzen's full-sized avatar

Zhen Zhang zarzen

View GitHub Profile
@zarzen
zarzen / hello.cpp
Created March 5, 2020 19:12
libfabric-hello
/**********************************************************************
* Simple Hello Test
* for
* Open Fabric Interface 1.x
*
* Jianxin Xiong
* (jianxin.xiong@intel.com)
* 2013-2017
* ********************************************************************/
#include <iostream>
@zarzen
zarzen / mimic_training_log_analysis_results.txt
Created January 11, 2020 04:16
mimic distributed training results
{
"folder": "20191220-013118-40Gbit-100Gbit-8p3dn-resnet101-imagenet",
"reduced_params": 178054802.176,
"actual_model_size": 178618432,
"missed_param_percent": 0.003155496427154847,
"mimic_coll_ops_time": 129155.102,
"horovod_coll_ops_time": 142147.65263157897,
"mimic_dur * (model_size/reduced_size)": 129563.94055149835,
"horovod_overhead": 0.09712356714775058
}
@zarzen
zarzen / mimic_env_setup.sh
Last active December 24, 2019 20:35
mimic env setup script
#!/bin/bash
AUTO_DIR="$HOME/autorun"
LOG_DIR="$HOME/autorun/chaokun_logs"
if [ ! -d "$LOG_DIR" ]; then
cd $AUTO_DIR && \
echo "downloading chaokun_logs.tar.gz" && \
wget -q https://dt-training.s3.amazonaws.com/chaokun_logs.tar.gz && \
echo "starting untar logs" && \
tar -zxf chaokun_logs.tar.gz && \
@zarzen
zarzen / eRPC-log.txt
Created December 17, 2019 04:40
eRPC compiling log
Scanning dependencies of target erpc
[ 1%] Building CXX object CMakeFiles/erpc.dir/src/rpc_impl/rpc_ev_loop.cc.o
[ 3%] Building CXX object CMakeFiles/erpc.dir/src/nexus_impl/nexus.cc.o
[ 2%] Building CXX object CMakeFiles/erpc.dir/src/nexus_impl/nexus_sm_thread.cc.o
[ 5%] Building CXX object CMakeFiles/erpc.dir/src/rpc_impl/rpc_queues.cc.o
[ 6%] Building CXX object CMakeFiles/erpc.dir/src/rpc_impl/rpc_rfr.cc.o
[ 10%] Building CXX object CMakeFiles/erpc.dir/src/transport_impl/dpdk/dpdk_transport.cc.o
[ 11%] Building CXX object CMakeFiles/erpc.dir/src/transport_impl/transport.cc.o
[ 12%] Building CXX object CMakeFiles/erpc.dir/src/nexus_impl/nexus_bg_thread.cc.o
[ 21%] Building CXX object CMakeFiles/erpc.dir/src/rpc_impl/rpc_req.cc.o
@zarzen
zarzen / conf.txt
Created December 7, 2019 02:31
vscode vim plugin
"vim.easymotion": true,
"vim.sneak": true,
"vim.incsearch": true,
"vim.useSystemClipboard": true,
"vim.useCtrlKeys": true,
"vim.hlsearch": true,
"vim.insertModeKeyBindings": [{
"before": ["f", "d"],
"after": ["<Esc>"]
}],
@zarzen
zarzen / dataset_links.txt
Created December 1, 2019 00:45
data set address
class Solution:
"""
@param board: the sudoku puzzle
@return: nothing
"""
def solveSudoku(self, board):
# write your code here
# if not board: return
# print('start')
empty_cells = self.getEmptyXY(board)
@zarzen
zarzen / sent_split.py
Last active October 27, 2018 03:15
sentence splitting
import json
import spacy
import string
import re
from nltk.tokenize.stanford_segmenter import StanfordSegmenter
from nltk.tokenize import sent_tokenize
def remove_nonascii(document):
printable = set(string.printable)
@zarzen
zarzen / unicodeToAscii.py
Last active August 13, 2018 20:24
turn unicode string to plain ascii
# Turn a Unicode string to plain ASCII, thanks to
# http://stackoverflow.com/a/518232/2809427
def unicodeToAscii(s):
return ''.join(
c for c in unicodedata.normalize('NFD', s)
if unicodedata.category(c) != 'Mn'
)
@zarzen
zarzen / android-perm-desc.json
Last active April 15, 2018 18:43
facebook platform permissions
{
"find accounts on the device": "Allows the app to get the list of accounts known by the device. This may include any accounts created by applications you have installed.",
"read your text messages (sms or mms)": "Allows the app to read SMS messages stored on your device or SIM card. This allows the app to read all SMS messages, regardless of content or confidentiality.",
"receive text messages (sms)": "Allows the app to receive and process SMS messages. This means the app could monitor or delete messages sent to your device without showing them to you.",
"send sms messages": "Allows the app to send SMS messages. This may result in unexpected charges. Malicious apps may cost you money by sending messages without your confirmation.",
"edit your text messages (sms or mms)": "Allows the app to write to SMS messages stored on your device or SIM card. Malicious apps may delete your messages.",
"read the contents of your usb storage": "Allows the app to read the contents of your USB storage.",
"modif