Skip to content

Instantly share code, notes, and snippets.

@hanxue
hanxue / vitis_ai_1.3_ami.sh
Created February 3, 2021 18:31
Vitis AI 1.3 AMI
export TZ=America/Denver
sudo ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
export VAI_ROOT=/opt/vitis_ai
export VAI_HOME=/vitis_ai_home
export LANG=en_US.UTF-8
export LANGUAGE=en_US:en
export LC_ALL=en_US.UTF-8
sudo chmod 1777 /tmp
@hanxue
hanxue / caffe-decent-gpu-feedstock-conda-meta.yaml
Created January 28, 2021 05:48
Vitis AI 1.3.0 Caffe GPU conda meta.yaml
package:
name: caffe_decent_gpu
version: {{ environ.get('BUILD_VER', '1.3.0') }}
build:
number: {{ environ.get('BUILD_NUMBER', '1') }}
string: {{ environ["GIT_FULL_HASH"][:8] }}
source:
#path: ../../caffe
@hanxue
hanxue / protobuf-2.5.0.spec
Created June 18, 2020 04:55
Protobuf 2.5.0 and 3.5.0 RPM spec files
# Build -python subpackage
%bcond_without python
# Build -java subpackage
%bcond_without java
# Don't require gtest
%bcond_with gtest
%if %{with python}
%define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")
%endif
@hanxue
hanxue / degreed_bookmarklet.js
Created April 14, 2020 11:21
Degreed browser bookmarklet
javascript: void((function(d) {
var e = d.createElement('script');
e.setAttribute('type', 'text/javascript');
e.setAttribute('charset', 'UTF-8');
e.setAttribute('src', 'https://prod.degreedcdn.com/scripts/button/dist/launcher.min.js?prod=true&v=1059425550&r=' + Math.random() * 99999999);
d.getElementsByTagName('body')[0].appendChild(e)
})(document));
@hanxue
hanxue / docker_run_options.sh
Created March 11, 2020 01:49
Docker run options
usage() {
cat >&2 <<EOF
Usage: $0 COMMAND
Commands:
[ cpu | gpu ] [-d] [-X]
EOF
exit 1
}
@hanxue
hanxue / mv-bash-command.sh
Last active August 30, 2019 04:49
List of Waymo datasets
for FILE in *.tar*; do mv "$FILE" "${FILE%%\?*}"; done
@hanxue
hanxue / Dockerfile
Last active August 27, 2019 11:16
Dockerfile for Petalinux 2019.1
FROM ubuntu:18.04
#RUN dpkg --add-architecture i386
RUN apt-get update
RUN apt-get install -y tofrodos
RUN apt-get install -y iproute2
RUN apt-get install -y gawk
RUN apt-get install -y xvfb
RUN apt-get install -y gcc-4.8
RUN apt-get install -y git
@hanxue
hanxue / Dockerfile
Last active April 17, 2023 14:15
Petalinux 2019.1 Docker
FROM ubuntu:18.04
#RUN dpkg --add-architecture i386
RUN apt-get update
RUN apt-get install -y tofrodos
RUN apt-get install -y iproute2
RUN apt-get install -y gawk
RUN apt-get install -y xvfb
RUN apt-get install -y gcc-4.8
RUN apt-get install -y git
@hanxue
hanxue / epel-7-metalink.xml
Created August 19, 2019 04:20
EPEL 7 repo metadata metalink XML
@hanxue
hanxue / pip-install-incremental.log
Created July 24, 2019 03:00
Error when installing pip from internal company mirror
2019-07-24T10:43:08 Created temporary directory: /tmp/pip-ephem-wheel-cache-zfy6r984
2019-07-24T10:43:08 Created temporary directory: /tmp/pip-req-tracker-y8w02b9g
2019-07-24T10:43:08 Created requirements tracker '/tmp/pip-req-tracker-y8w02b9g'
2019-07-24T10:43:08 Created temporary directory: /tmp/pip-install-_1o7olfy
2019-07-24T10:43:08 Looking in indexes: https://pipmirror.company.com/simple
2019-07-24T10:43:08 Collecting scrapy
2019-07-24T10:43:08 1 location(s) to search for versions of scrapy:
2019-07-24T10:43:08 * https://pipmirror.company.com/simple/scrapy/
2019-07-24T10:43:08 Getting page https://pipmirror.company.com/simple/scrapy/
2019-07-24T10:43:08 Analyzing links from page https://pipmirror.company.com/simple/scrapy/