blah |
![]() |
![]() |
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
| def read_seq(path): | |
| def read_header(ifile): | |
| feed = ifile.read(4) | |
| norpix = ifile.read(24) | |
| version = struct.unpack('@i', ifile.read(4)) | |
| length = struct.unpack('@i', ifile.read(4)) | |
| assert(length != 1024) | |
| descr = ifile.read(512) | |
| params = [struct.unpack('@i', ifile.read(4))[0] for i in range(0,9)] |
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
| # Adapted the following lib/datasets/inria.py for py-faster-rcnn | |
| # https://github.com/zeyuanxy/fast-rcnn/blob/master/lib/datasets/inria.py | |
| # -------------------------------------------------------- | |
| # Fast R-CNN | |
| # Copyright (c) 2015 Microsoft | |
| # Licensed under The MIT License [see LICENSE for details] | |
| # Written by Ross Girshick | |
| # -------------------------------------------------------- |
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
| # This is shorthened version of blog post | |
| # http://ksopyla.com/2017/02/tensorflow-gpu-virtualenv-python3/ | |
| # update packages | |
| sudo apt-get update | |
| sudo apt-get upgrade | |
| #Add the ppa repo for NVIDIA graphics driver | |
| sudo add-apt-repository ppa:graphics-drivers/ppa | |
| sudo apt-get update |
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 scipy | |
| import scipy.ndimage | |
| from scipy.ndimage.filters import gaussian_filter | |
| from scipy.ndimage.interpolation import map_coordinates | |
| import collections | |
| from PIL import Image | |
| import numbers | |
| __author__ = "Wei OUYANG" |
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
| // ==UserScript== | |
| // @name Overleaf Editor Enhancer | |
| // @namespace https://gist.github.com/indirivacua/1b9c878c5b7e3487be7ca5fb384ff286 | |
| // @version 0.1 | |
| // @description This script aims to improve productivity and user experience on Overleaf LaTeX editor. | |
| // @author indirivacua | |
| // @match https://*.overleaf.com/project/* | |
| // @icon https://images.ctfassets.net/nrgyaltdicpt/h9dpHuVys19B1sOAWvbP6/5f8d4c6d051f63e4ba450befd56f9189/ologo_square_colour_light_bg.svg | |
| // @grant none | |
| // @license MIT |
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
| /** | |
| * Huawei AX3 DNS Interceptor (hardened) | |
| * - Catches Request objects and string URLs | |
| * - Matches by pathname to survive host changes | |
| * - Safely clones & rewrites JSON bodies | |
| * | |
| * Edit these: | |
| */ | |
| const PAGE_IP = location.hostname || "192.168.100.1"; // your router IP (auto-uses current host) | |
| const CUSTOM_DNS1 = "1.1.1.1"; // primary DNS |
