Skip to content

Instantly share code, notes, and snippets.

@catphive
catphive / closure.c
Created February 21, 2011 18:40
example of a GNU C program that needs an executable stack
#include <stdlib.h>
#include <stdio.h>
int main() {
int count = 0;
int compar(const void *left_ptr, const void *right_ptr) {
int left = *(int*)left_ptr;
int right = *(int*)right_ptr;
++count;
return left - right;
@catphive
catphive / srt-adjust.el
Created February 15, 2012 07:50
code to adjust SRT subtitle timing in emacs
(defun incr-time (adjust-millis hour minute second milli)
(message (format "test %d" adjust-millis))
(let ((total-millis (+ milli (* second 1000) (* minute 60 1000) (* hour 60 60 1000))))
(setq total-millis (+ total-millis adjust-millis))
(format "%02d:%02d:%02d,%03d"
(/ total-millis 3600000)
(% (/ total-millis 60000) 60)
(% (/ total-millis 1000) 60)
(% total-millis 1000))))
@catphive
catphive / vector_comprehension.hpp
Created April 6, 2012 09:54
list comprehensions for C++
// Python style list comprehensions for C++.
// Example: multiply all elements of vector literal by 2.
//
// auto vec_doubled = VFOR(std::vector<int>({1,2,3}), x, x * 2);
//
// vec_squared is now equal to std::vector<int>({1,4,6})
#include <vector>
#include <type_traits>
<path id="compile.classpath">
<!-- Include all elements that Tomcat exposes to applications -->
<fileset dir="${catalina.home}/bin">
<include name="*.jar"/>
</fileset>
<pathelement location="${catalina.home}/lib"/>
<fileset dir="${catalina.home}/lib">
<include name="*.jar"/>
</fileset>
<path id="compile.classpath">
<!-- Include all elements that Tomcat exposes to applications -->
<fileset dir="${catalina.home}/bin">
<include name="*.jar"/>
</fileset>
<pathelement location="${catalina.home}/lib"/>
<fileset dir="${catalina.home}/lib">
<include name="*.jar"/>
</fileset>
</path>
@catphive
catphive / 0_reuse_code.js
Last active August 29, 2015 14:17
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@catphive
catphive / results.txt
Created October 12, 2019 20:26
second.pytorch kitti detection results
Evaluation official
Car AP(Average Precision)@0.70, 0.70, 0.70:
bbox AP:98.60, 90.50, 90.01
bev AP:98.40, 90.12, 89.44
3d AP:90.30, 88.08, 82.51
aos AP:0.28, 0.82, 1.04
Car AP(Average Precision)@0.70, 0.50, 0.50:
bbox AP:98.60, 90.50, 90.01
bev AP:98.85, 91.74, 90.35
3d AP:98.81, 90.68, 90.29
@catphive
catphive / validation.txt
Created October 12, 2019 21:17
run on validation dataset
Evaluation official
Car AP(Average Precision)@0.70, 0.70, 0.70:
bbox AP:90.58, 88.68, 86.86
bev AP:90.16, 87.11, 84.94
3d AP:85.34, 76.21, 70.20
aos AP:0.37, 1.35, 2.15
Car AP(Average Precision)@0.70, 0.50, 0.50:
bbox AP:90.58, 88.68, 86.86
bev AP:90.70, 89.84, 89.21
3d AP:90.70, 89.76, 89.00