This file contains hidden or 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
{ | |
// from https://stackoverflow.com/a/60438516 | |
"terminal.integrated.env.linux": { | |
"BASH_INIT_COMMAND": "source ~/conda_init.sh && conda activate exp_prelim" | |
}, | |
"python.analysis.typeCheckingMode": "basic", | |
"python.defaultInterpreterPath": "/home/kwu/anaconda3/envs/exp_prelim/bin/python", | |
} |
This file contains hidden or 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
#sudo cpupower frequency-set --governor performance | |
#sudo nvidia-smi --persistence-mode=1 | |
#sudo nvidia-smi --compute-mode=1 | |
#sudo nvidia-smi -lgc 1395,1395 | |
# write benchmark logic here | |
#sudo cpupower frequency-set --governor powersave | |
#sudo nvidia-smi -rgc |
This file contains hidden or 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
abysmal | |
adverse | |
alarming | |
angry | |
annoy | |
anxious | |
apathy | |
appalling | |
atrocious | |
awful |
This file contains hidden or 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
/* | |
* From https://www.open-mpi.org/faq/?category=runcuda | |
* Command: | |
* $ mpic++ cuda_aware_check.cpp | |
* $ mpirun a.out | |
* Program that shows the use of CUDA-aware macro and runtime check. | |
* Requires Open MPI v2.0.0 or later. | |
*/ | |
#include <stdio.h> | |
#include "mpi.h" |
This file contains hidden or 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 os | |
import math | |
def do_unmount_mount(mount_dev,mount_point): | |
os.system("sudo mount {mount_dev} {mount_point}".format(mount_dev=mount_dev, mount_point=mount_point)) | |
os.system("sudo umount {mount_point}".format(mount_point=mount_point)) | |
def do_write_read_test(file_name, file_name2, pos_list_beg, pos_list_end, pos_list2_beg, pos_list2_end, block_char_num, file_content, file_content2, mount_dev, mount_point, remount_prob, is_seek): | |
if is_seek: |
This file contains hidden or 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
from bs4 import BeautifulSoup | |
import requests | |
import xlsxwriter | |
import bs4 | |
def get_options_url(): | |
BASEURL = "https://software.intel.com" | |
URL = "https://software.intel.com/en-us/cpp-compiler-developer-guide-and-reference-alphabetical-list-of-compiler-options" | |
response = requests.get(URL) | |
soup = BeautifulSoup(response.content, 'html.parser') |
This file contains hidden or 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
# Reference 1: https://dev.labs.cognitive.microsoft.com/docs/services/56332331778daf02acc0a50b/operations/565d9001ca73072048922d97 | |
# Reference 2: https://docs.microsoft.com/en-us/azure/cognitive-services/academic-knowledge/paperentityattributes | |
key1 = 'put_your_key_here' | |
key2 = 'put_your_key_here' | |
key = 'put_your_key_here' | |
CS_CATEGORIES = ["artificial intelligence", "computer hardware", "computer vision", "computer network", | |
"real-time computing", "distributed computing", "pattern recognition", "data mining", | |
"machine learning", "embedded system", "knowledge management", "multimedia", "library science", | |
"simulation", "algorithm", "database", "world wide web", "computer security", "speech recognition", |
This file contains hidden or 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
void relu_impl_ref(float* output,float* data, size_t size) { | |
#pragma omp parallel for | |
for (size_t i = 0; i < size; i++) | |
{ | |
if (data[i] < 0) | |
{ | |
output[i] = 0; | |
} | |
else { | |
output[i] = data[i]; |
This file contains hidden or 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
#!/usr/bin/env python2.7 | |
# -*- coding: utf-8 -*- | |
from __future__ import print_function | |
from __future__ import unicode_literals | |
''' | |
author: K-Wu | |
filename: monitor | |
Python version: 2.7 | |
IDE version: PyCharm |
This file contains hidden or 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
#! /usr/bin/env python3 | |
# -*- coding: utf-8 -*- | |
#Wu Kun,2015010625 ee@tsinghua | |
#This is a multithread implement of dbrt.py | |
import json | |
import queue | |
import time | |
import urllib.request as req | |
from bs4 import BeautifulSoup | |
import threading |
NewerOlder