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
# x - easting, y - northing | |
def grid20k(x, y): | |
x = int(x) // 1000 - 200 | |
y = int(y) // 1000 - 5900 | |
idx = (y // 100) * 1000 + (y // 10 % 10) * 10 | |
idx += (x // 100) * 100 + (x // 10 % 10) | |
return idx | |
def grid10k(x, y): |
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 | |
mv "$1" "${1%.*}"-$(sha256sum "$1" | cut -c1-8).pt |
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 taichi as ti | |
from skimage.io import imread, imsave | |
ti.init(arch=ti.cuda) | |
@ti.kernel | |
def normals_from_depth_kernel(f: ti.f32, cx: ti.f32, cy: ti.f32, window_size: ti.u16, max_rel_depth_diff: ti.f32): | |
height, width = ti_depth.shape() |
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 | |
files=( | |
2011_09_26_calib.zip | |
2011_09_26_drive_0001 | |
2011_09_26_drive_0002 | |
2011_09_26_drive_0005 | |
2011_09_26_drive_0009 | |
2011_09_26_drive_0011 | |
2011_09_26_drive_0013 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 | |
set -e -u -o pipefail -o noglob | |
set -x | |
CUDA_VERSION=${CUDA_VERSION:-10.2} | |
CUDNN_VERSION=${CUDNN_VERSION:-7} | |
TENSORRT_VERSION=${TENSORRT_VERSION:-7} | |
UBUNTU_RELEASE=$(lsb_release -rs) # 18.04 | |
DISTRO=ubuntu${UBUNTU_RELEASE//\./} # ubuntu1804 |
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 | |
BIN=/usr/bin | |
MAN=/usr/share/man/man1 | |
function register_clang_version { | |
BINV=$1 | |
PRIORITY=`echo $BINV | awk '{print int($1 * 10)}'` | |
update-alternatives --install $BIN/clang clang $BIN/clang-$BINV $PRIORITY \ | |
--slave $BIN/clang++ clang++ $BIN/clang++-$BINV |
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 nvcc --run "$0" -o /tmp/get_cuda_gencode; rm /tmp/get_cuda_gencode; exit | |
#include <cuda_runtime_api.h> | |
#include <iostream> | |
#include <set> | |
int main(int argc, char *argv[]) { | |
cudaDeviceProp prop; | |
cudaError_t status; | |
int device_count; | |
status = cudaGetDeviceCount(&device_count); |
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
--- src/leakyrelu.cc (revision 830d5ef7a5b1f33de2aa95405787c03e4de77306) | |
+++ src/leakyrelu.cc (date 1554811334000) | |
@@ -22,7 +22,7 @@ | |
using namespace tensorflow; | |
-REGISTER_OP("LeakyRelu") | |
+REGISTER_OP("LeakyReluLmb") | |
.Attr("T: {float, double}") | |
.Attr("leak: float = 0.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
#include <cmath> | |
#include <utility> | |
// Input: WGS84 longitude and latitude | |
// Output: x - easting, y - northing in L-EST97 (EPSG:3301) | |
// Source: http://www.maaamet.ee/rr/geo-lest/files/geo-lest_function_php.txt | |
std::pair<double, double> geo_lest(const double lon, const double lat) { | |
using namespace std; | |
constexpr double deg2rad = M_PI / 180.; | |
constexpr double a = 6378137.; |