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 | |
### steps #### | |
# verify the system has a cuda-capable gpu | |
# download and install the nvidia cuda toolkit and cudnn | |
# setup environmental variables | |
# verify the installation | |
### | |
### to verify your gpu is cuda enable check |
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
# ref: https://stackoverflow.com/a/14241195/7961693 | |
""" | |
# timestamp can be read from lidars/ folder | |
stamp_file_path = os.path.join(allf.lidar_dir, seq+'_stamped.npy') | |
lidar_stamped_dict = np.load(stamp_file_path, allow_pickle=True) | |
ts_np = lidar_stamped_dict.item().get('timestamp') | |
all_det_list = [] | |
within_det5_list = [] | |
within_det10_list = [] |
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
{ | |
// Place your snippets for python here. Each snippet is defined under a snippet name and has a prefix, body and | |
// description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are: | |
// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. Placeholders with the | |
// same ids are connected. | |
// Example: | |
// "Print to console": { | |
// "prefix": "log", | |
// "body": [ | |
// "console.log('$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
import os | |
import requests | |
from urllib.parse import urljoin | |
from bs4 import BeautifulSoup | |
import argparse | |
#%% Example | |
# one pdf | |
# python all_pdf_dl.py -l https://memento.epfl.ch/academic-calendar/ --save-here | |
# many pdfs |
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 -*- | |
""" | |
(original code running in Python2) | |
https://gist.github.com/aymanfarhat/6098683 | |
@author: HYJ | |
""" | |
import random | |
# generate dict-based graph from txt | |
def load_graph(): |
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
% process path to make sure it's uniform | |
% ispc() 用于判定在win系统下运行,把他改成标准化的'/' | |
% streep()可以用于替换单个str元素或者cell array中的str | |
if ispc(), base_path = strrep(base_path, '\', '/'); end | |
% 在行末补上一个/ | |
if base_path(end) ~= '/', base_path(end+1) = '/'; end |