Skip to content

Instantly share code, notes, and snippets.

"""
Open a random CVPR talk (oral or spotlight) in the browser
"""
import urllib.request, urllib.error
import webbrowser
import random
URL = "http://cvpr2020.thecvf.com/sites/default/files/2020-03/accepted_list_0.txt"
# This file is part of EAP.
#
# EAP is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as
# published by the Free Software Foundation, either version 3 of
# the License, or (at your option) any later version.
#
# EAP is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
@mgard
mgard / detect.py
Created September 16, 2015 20:34
# import the necessary packages
import argparse
import datetime
import imutils
import time
import cv2
# construct the argument parser and parse the arguments
ap = argparse.ArgumentParser()
ap.add_argument("-v", "--video", help="path to the video file")
@mgard
mgard / gist:e8e14cfb304f8dcc7414
Created March 16, 2015 21:29
Uniform crossover selection for GP (DEAP)
def getChildrenIndices(ind, pos):
listChildPos = []
pos += 1
for i in range(ind[pos-1].arity):
# We get the root of the child subtree
listChildPos.append(pos)
# We look for the size of this subtree
pos = ind.searchSubtree(pos).stop
return listChildPos