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/python | |
import argparse | |
import os | |
import numpy as np | |
from icrawler.builtin import GoogleImageCrawler | |
def get_files(directory, extensions=None, shuffle=False): |
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
""" | |
References: | |
https://github.com/tensorflow/models/blob/master/object_detection/g3doc/exporting_models.md | |
https://github.com/tensorflow/models/issues/1988 | |
Unfortunately, the tutorial for saving a model for inference "freezes" the | |
variables in place and makes them unservable by tensorflow_serving. | |
export_inference_graph.py exports an empty "variables" directory, which needs to | |
be populated. |
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 | |
""" Email Me. | |
Usage: | |
emailme <message> | |
emailme [-s] <message> | |
emailme [-s] <subject> <message> | |
emailme <toaddr> <subject> <message> | |
emailme <toaddr> <fromaddr> <subject> <message> | |
emailme -h | --help |
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
from django.contrib import admin | |
from django.contrib.auth.models import User | |
from django.contrib.auth.admin import UserAdmin | |
from django.forms.models import inlineformset_factory | |
from django import forms | |
from django.contrib.auth.forms import UserCreationForm, UserChangeForm | |
def upgrade_user_admin(UserProfile=None, unique_email=False, | |
list_display=None): |