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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import struct | |
import sys | |
sys.stdout.flush() | |
def main(): | |
with open('DRAKS0005.sl2', 'rb') as fo: | |
fo.seek(0x3c0, 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 baker | |
import json | |
import os | |
from cytoolz import merge, join, groupby | |
from cytoolz.compatibility import iteritems | |
from cytoolz.curried import update_in | |
from itertools import starmap | |
from collections import deque | |
from lxml import etree, objectify | |
from scipy.io import savemat |
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
module.exports = { | |
rpc: { | |
host: "localhost", | |
port: 8543 | |
}, |
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
source ~/Downloads/inference_engine_vpu_arm/bin/setupvars.sh | |
~/Downloads/inference_engine_vpu_arm/install_dependencies/install_NCS_udev_rules.sh | |
cd ~/detection_server && ./RUN.sh |
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 os | |
from flask import Flask, flash, request, redirect, url_for, jsonify | |
import util_mobilnet | |
import numpy as np | |
import os, cv2 | |
from flask_cors import CORS | |
# settings | |
UPLOAD_FOLDER = '.' | |
ALLOWED_EXTENSIONS = set(['png', 'jpg', 'jpeg']) |
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 | |
export FLASK_APP=server.py | |
python3 -m flask run |
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 numpy as np | |
import cv2 | |
# frame dimensions should be square | |
PREPROCESS_DIMS = (300, 300) | |
def read_labels(label_map_path = 'models/labelmap.prototxt'): | |
CLASSES = [] | |
with open(label_map_path) as f: | |
lines = f.readlines() |
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
// HOTKEYS to listen to | |
var HOTKEYS = map[int16]*Hotkey{ | |
1: &Hotkey{4, ModAlt + ModCtrl, 'D'}, | |
} | |
const ( | |
ModAlt = 1 << iota | |
ModCtrl | |
ModShift | |
ModWin |
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 ( | |
"bytes" | |
"fmt" | |
"strings" | |
"syscall" | |
"time" | |
"unsafe" | |
) | |
func main() { |
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
// MSG see https://docs.microsoft.com/en-us/windows/win32/api/winuser/ns-winuser-msg | |
type MSG struct { | |
HWND uintptr | |
UINT uintptr | |
WPARAM int16 | |
LPARAM int64 | |
DWORD int32 | |
POINT struct{ X, Y int64 } | |
} |
OlderNewer