netsh interface portproxy add v4tov4 listenport=5000 listenaddress=0.0.0.0 connectport=5000 connectaddress=(wsl hostname -I)
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
#! /usr/bin/env python | |
""" | |
Reads Darknet config and weights and creates Keras model with TF backend. | |
""" | |
import argparse | |
import configparser | |
import io | |
import os |
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 os | |
import asyncio | |
import aiobotocore | |
import io | |
from PIL import Image | |
AWS_ACCESS_KEY_ID = os.environ['AWS_ACCESS_KEY_ID'] | |
AWS_SECRET_ACCESS_KEY = os.environ['AWS_SECRET_ACCESS_KEY'] | |
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
[MESSAGES CONTROL] | |
disable=C0114,C0115,C0116,E1101,E1133,R0903 |
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 re | |
class Name: | |
def __get__(self, obj, objtype=None): | |
return self.value | |
def __set__(self, obj, value): | |
if len(value) > 20: | |
raise ValueError("Name cannot exceed 20 characters.") | |
self.value = value |
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 the necessary packages | |
import numpy as np | |
def non_max_suppression(boxes, probs=None, overlapThresh=0.3): | |
# if there are no boxes, return an empty list | |
if len(boxes) == 0: | |
return [] | |
# if the bounding boxes are integers, convert them to floats -- this | |
# is important since we'll be doing a bunch of divisions |
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
#!/bin/bash | |
# Flushing all rules | |
iptables -F FORWARD | |
iptables -F INPUT | |
iptables -F OUTPUT | |
iptables -X | |
# Setting default filter policy | |
iptables -P INPUT DROP | |
iptables -P OUTPUT DROP | |
iptables -P FORWARD DROP |