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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Title</title> | |
</head> | |
<style> | |
.urgent{color:red} | |
.high{color:orange} | |
.normal{color:skyblue} |
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
#!/bin/bash | |
function ensure_privileged_or_exit() | |
{ | |
local cap_lst=$(capsh --decode=00000007ffffffff | cut -d "=" -f2 | tr ',' ' ') | |
for curr_cap in $(capsh --print | grep Current: | cut -d "=" -f2 | tr ',' ' '); do | |
cap_lst=$(echo "$cap_lst" | sed -e "s/$curr_cap//g") | |
done | |
cap_lst=$(echo "$cap_lst" | sed -e "s/ //g") |
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
#이번에 제 centos7용 docker-ce, nvidia-docker install script가 갑자기 깨져서, 확인중입니다. | |
#내용은 스크린샷처럼 docker-ce와 nvidia-docker2 2.0.3의 dependency관계 때문에 문제가 생겼습니다. | |
#에러는 yum install -y nvidia-docker2 수행중 발생하고, 에러내용은 스크린샷으로 올렸습니다. | |
#제 스크립트 중 설치하는부분만 빼서 보면 아래 내용인데요. | |
sudo bash -e <<EOF | |
yum-config-manager \ | |
--add-repo \ |
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
# coding=utf-8 | |
from __future__ import print_function | |
import datetime | |
import json | |
import os | |
from copy import deepcopy | |
import gspread | |
from oauth2client.service_account import ServiceAccountCredentials |
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 os | |
from setuptools import setup, find_packages | |
from mtml.about import __version__, __description__ | |
try: | |
import CPLEX | |
except ImportError as e: | |
raise EnvironmentError("""You must install CPLEX manually first. |
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 android.content.Context; | |
import android.content.res.TypedArray; | |
import android.support.v7.widget.SwitchCompat; | |
import android.util.AttributeSet; | |
import android.util.Log; | |
import android.view.LayoutInflater; | |
import android.view.View; | |
import android.widget.Checkable; | |
import android.widget.CompoundButton; | |
import android.widget.LinearLayout; |
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 requests | |
def get_header_names(decoded): | |
ret = [] | |
first_tr_idx_st = decoded.find("<tr>") | |
first_tr_idx_ed = decoded.find("</tr>") | |
headers = decoded[first_tr_idx_st + len("<tr>"):first_tr_idx_ed] | |
# print(headers) |
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
#!/bin/bash | |
a=abc!! | |
echo a=[$a] | |
echo "" | |
result=`echo $a | sed -e 's/!/\\\\!/g'` | |
echo \`~\`=[$result] | |
echo "" |
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
#!/bin/sh -e | |
OS=${OS:-`uname`} | |
old_rev="$1" | |
new_rev="$2" | |
get_file_rev() { | |
git rev-list -n 1 "$new_rev" "$1" | |
} |
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
# Sets the minimum version of CMake required to build the native library. | |
cmake_minimum_required(VERSION 3.4.1) | |
# Ref: https://github.com/tensorflow/tensorflow/blob/v1.4.0/tensorflow/contrib/android/cmake/CMakeLists.txt#L37-L48 | |
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DIS_SLIM_BUILD \ | |
-std=c++11 -fno-rtti -fexceptions \ | |
-O2 -Wno-narrowing -fomit-frame-pointer \ | |
-fPIE \ | |
-ftemplate-depth=900 \ | |
-DGOOGLE_PROTOBUF_NO_RTTI \ |