Backup a specific binary release version of V2Ray.
This file contains 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 json | |
import os | |
from tqdm import tqdm | |
from xmltodict import unparse | |
# BBOX_OFFSET: Switch between 0-based and 1-based bbox. | |
# The COCO dataset is in 0-based format, while the VOC dataset is 1-based. | |
# To keep 0-based, set it to 0. To convert to 1-based, set it to 1. | |
BBOX_OFFSET = 0 |
This file contains 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 cv2 | |
cam = cv2.VideoCapture(0) | |
cam.set(3, 640) # set video width | |
cam.set(4, 480) # set video height | |
face_detector = cv2.CascadeClassifier('conf/haarcascade_frontalface_default.xml') | |
# For each person, enter one numeric face id | |
names_count = [x.strip() for x in open('conf/names.txt').readlines() if x.strip() != ""] |
This file contains 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 base64 | |
server = "12.34.56.78" | |
port = "12345" | |
password = "Here is the password" | |
encrypt_method = "chacha20-ietf-poly1305" | |
s = "{}:{}".format(encrypt_method, password).encode() | |
print("ss://{}@{}:{}".format(base64.standard_b64encode(s).decode(), server, port)) |
This file contains 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 torch | |
import torchvision | |
import torchvision.transforms as transforms | |
from torch.utils.data import DataLoader | |
import numpy as np | |
import os | |
from tqdm import tqdm, trange | |
from skimage.io import imsave | |
from easydict import EasyDict | |
from copy import deepcopy |
This file contains 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 | |
TMUX_VERSION="2.1" | |
LIBEVENT_VERSION="2.0.20" | |
NCURSES_VERSION="6.0" | |
# Set this flag to prevent errors | |
export CPPFLAGS="-P" | |
# Script for installing tmux on systems where you don't have root access. |
A Dataset
for yolo2-pytorch
Minimal code modify.
If you have any better code, please let me know~ THX!!!!!
- [20180426] The original code
- [20180427] Simple multi thread
This file contains 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
from xmlrpc.client import Transport, GzipDecodedResponse | |
class CustomTransport(Transport): | |
def parse_response(self, response): | |
# Read response data from httpresponse, and parse it | |
# Check for new http response object, else it is a file object | |
if hasattr(response, 'getheader'): | |
if response.getheader("Content-Encoding", "") == "gzip": | |
stream = GzipDecodedResponse(response) |
This file contains 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 -*- | |
import time | |
import redis | |
import os | |
import cv2 | |
from threading import Thread | |
import requests | |
from tqdm import tqdm | |
from bs4 import BeautifulSoup |
This file contains 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
void validate_detector_PRcurve(char *datacfg, char *cfgfile, char *weightfile) | |
{ | |
list *options = read_data_cfg(datacfg); | |
char *valid_images = option_find_str(options, "valid", "data/voc.2007.test"); | |
network net = parse_network_cfg(cfgfile); | |
if(weightfile){ | |
load_weights(&net, weightfile); | |
} | |
set_batch_network(&net, 1); |