Skip to content

Instantly share code, notes, and snippets.

@AlexeyGy
AlexeyGy / eur0pa-dks_deathtoll_2015_update.py
Last active May 10, 2017 02:00 — forked from eur0pa/eur0pa-dks_deathtoll.py
Dark Souls Deaths Counter
#!/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)
@AlexeyGy
AlexeyGy / coco2pascal.py
Last active July 22, 2022 09:25
Convert MS COCO Annotation to Pascal VOC format for python3 and with tqdm
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
module.exports = {
rpc: {
host: "localhost",
port: 8543
},
@AlexeyGy
AlexeyGy / .bashrc.sh
Last active May 19, 2019 12:14
.bashrc
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
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'])
#!/bin/bash
export FLASK_APP=server.py
python3 -m flask run
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()
// HOTKEYS to listen to
var HOTKEYS = map[int16]*Hotkey{
1: &Hotkey{4, ModAlt + ModCtrl, 'D'},
}
const (
ModAlt = 1 << iota
ModCtrl
ModShift
ModWin
import (
"bytes"
"fmt"
"strings"
"syscall"
"time"
"unsafe"
)
func main() {
// 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 }
}