View Dockerfile
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
# docker image to download yum rpms via dependencies | |
# these are the centos tags you can use below if you want to use a different version of centos | |
#latest, centos7, 7 (docker/Dockerfile) | |
#centos6, 6 (docker/Dockerfile) | |
#centos5, 5 (docker/Dockerfile) | |
#centos7.1.1503, 7.1.1503 (docker/Dockerfile) | |
#centos7.0.1406, 7.0.1406 (docker/Dockerfile) | |
#centos6.7, 6.7 (docker/Dockerfile) | |
#centos6.6, 6.6 (docker/Dockerfile) | |
#centos5.11, 5.11 (docker/Dockerfile) |
View bootstrap_docker_ip.sh
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
###### Get docker machine ip ###### | |
# able to resolve docker ip for both Docker Toolbox and Docker Desktop | |
if [[ -z "${DOCKER_HOST_IP-}" ]]; then | |
docker_host_ip=$(docker run --rm --net host alpine ip address show eth0 | awk '$1=="inet" {print $2}' | cut -f1 -d'/') | |
# Work around Docker for Mac 1.12.0-rc2-beta16 (build: 9493) | |
if [[ $docker_host_ip = '192.168.65.2' ]]; then | |
docker_host_ip=$(/sbin/ifconfig | grep -v '127.0.0.1' | awk '$1=="inet" {print $2}' | cut -f1 -d'/' | head -n 1) | |
fi | |
export DOCKER_HOST_IP=$docker_host_ip |
View remove_android_studio.sh
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
# https://stackoverflow.com/questions/17625622/how-to-completely-uninstall-android-studio/18458893#18458893 | |
# with small modification | |
rm -Rf /Applications/Android\ Studio.app | |
rm -Rf ~/Library/Preferences/AndroidStudio* | |
rm -Rf ~/Library/Preferences/com.google.android.* | |
rm -Rf ~/Library/Preferences/com.android.* | |
rm -Rf ~/Library/Application\ Support/AndroidStudio* | |
rm -Rf ~/Library/Android/* | |
rm -Rf ~/Library/Logs/AndroidStudio* | |
rm -Rf ~/Library/Caches/AndroidStudio* |
View remove_python_macos.sh
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
sudo rm '/usr/local/bin/2to3' | |
sudo rm '/usr/local/bin/2to3-3.6' | |
sudo rm '/usr/local/bin/idle3' | |
sudo rm '/usr/local/bin/idle3.6' | |
sudo rm '/usr/local/bin/pydoc3' | |
sudo rm '/usr/local/bin/pydoc3.6' | |
sudo rm '/usr/local/bin/python3' | |
sudo rm '/usr/local/bin/python3-32' | |
sudo rm '/usr/local/bin/python3-config' | |
sudo rm '/usr/local/bin/python3.6' |
View download_megaface.sh
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
#! /bin/bash | |
# Specify the destination of donwloaded files | |
DESTINATION="megaface_downloads" | |
# You may get the credential by following the instructions in | |
# `http://megaface.cs.washington.edu/participate/challenge.html` | |
# Follow the below format for the credential file: | |
# ``` | |
# machine megaface.cs.washington.edu | |
# login <your-login-name> |
View algo-test.tex
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
\documentclass{article} | |
\usepackage[utf8]{inputenc} | |
% \usepackage[linesnumbered,ruled]{algorithm2e} | |
\usepackage{algorithm, algorithmic} | |
% \usepackage{algorithm,algpseudocode} | |
% \usepackage{amsfonts} | |
% ---------- BEGIN of managing indent in algorithm ---------- | |
\newlength\myindent | |
\setlength\myindent{2em} |
View simple-ieee-ref-example.tex
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
\documentclass{article} | |
\usepackage[utf8]{inputenc} | |
\usepackage{cite} | |
\begin{document} | |
\nocite{*} | |
\bibliographystyle{IEEEtran} | |
\bibliography{IEEEabrv,ref}{} | |
% \bibliography{IEEEabrv,references}{} |
View filecontents-sample.tex
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
% Provide some test content | |
\begin{filecontents*}{\jobname.bib} | |
@article{Bao2015, | |
author = {Bao, Z. and Pan, G. and Zhou, W.}, | |
doi = {10.1109/TIT.2015.2421894}, | |
issue = {6}, | |
journal = IEEE_J_IT, | |
pages = {3413-3426}, | |
title = {Asymptotic Mutual Information Statistics of | |
{mimo} Channels and {CLT} of Sample Covariance Matrices}, |
View chrome_drive_download.py
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 urllib.request | |
import requests | |
from selenium import webdriver | |
from selenium.webdriver import ActionChains | |
from selenium.webdriver.common.keys import Keys | |
from selenium.webdriver.common.by import By | |
from selenium.webdriver.support.ui import WebDriverWait | |
from selenium.webdriver.support import expected_conditions as EC | |
from bs4 import BeautifulSoup | |
import time |
View yolo_gen_train_lst.py
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
from pathlib import Path | |
for img_file in Path('./JPEGImages').iterdir(): | |
with open('train.txt', 'w') as f: | |
print(img_file.resolve(), file=f) |
NewerOlder