Skip to content

Instantly share code, notes, and snippets.

View tianzhi0549's full-sized avatar

Tian Zhi tianzhi0549

View GitHub Profile
@tianzhi0549
tianzhi0549 / nginx502.py
Created May 29, 2015 09:53
Restart php-fpm when nginx returns status 502.
import httplib2, os, time
def getCurTime():
return time.strftime('%Y-%m-%d %H:%M:%S',time.localtime(time.time()))
def logging(str):
file=open("nginx502.log", "w")
file.writelines(str)
file.close()
h = httplib2.Http(".cache")
program (program->declaration-list)
declaration-list (declaration-list->declaration-list declaration)
declaration-list (declaration-list->declaration)
declaration (declaration->fun-declaration)
fun-declaration (fun-declaration->type-specifier ID ( params ) compound-stmt)
type-specifier (type-specifier->int)
int
ID
(
params (params->param-list)
set sts=4
set sw=4
set autoindent
set smartindent
set smarttab
set expandtab
set number
python test_icdar.py --deploy iou_loss_final/test_nohyper_relu.pt --weights iou_loss_final/model/pva_4s_nohyper_relu_iter_40000.caffemodel --file ../../DATA/icdar15/test/ --save=1 --rf=10 --fcn_th=0.75
import numpy as np
import itertools
DIMS = [3, 2, 2]
MAX_NUM_COMPONENTS = 2 ** np.prod(DIMS)
class Component(object):
def __init__(self, arr):
self.arr = arr
@tianzhi0549
tianzhi0549 / trainaug.txt
Created March 17, 2018 06:56 — forked from sun11/trainaug.txt
Training image list for segmentation on Pascal VOC with SBD annotations
2007_000032
2007_000039
2007_000063
2007_000068
2007_000121
2007_000170
2007_000241
2007_000243
2007_000250
2007_000256
Annotation Type: bbox
loading annotations into memory...
Done (t=4.88s)
creating index...
index created!
Loading and preparing results...
DONE (t=30.50s)
creating index...
index created!
evaluate category: person
Annotation Type: bbox
loading annotations into memory...
Done (t=3.38s)
creating index...
index created!
Loading and preparing results...
DONE (t=23.02s)
creating index...
index created!
evaluate category: person
Annotation Type: bbox
loading annotations into memory...
Done (t=3.14s)
creating index...
index created!
Loading and preparing results...
DONE (t=17.27s)
creating index...
index created!
evaluate category: person
Annotation Type: bbox
loading annotations into memory...
Done (t=4.34s)
creating index...
index created!
Loading and preparing results...
DONE (t=23.75s)
creating index...
index created!
evaluate category: person