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 tensorflow as tf | |
session = tf.compat.v1.Session() | |
graph = tf.compat.v1.get_default_graph() | |
with graph.as_default(): | |
with session.as_default(): | |
base_model = tf.keras.applications.MobileNetV2(weights='imagenet', input_tensor=tf.compat.v1.placeholder('float32', shape=(1,224,224,3))) | |
run_meta = tf.compat.v1.RunMetadata() | |
opts = tf.compat.v1.profiler.ProfileOptionBuilder.float_operation() |
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 argparse | |
import flickrapi | |
import progressbar | |
import os | |
import concurrent.futures | |
from urllib.request import urlopen | |
progress = 0 | |
api_key = u'SOME_KEY' | |
api_secret = u'SOME_SECRET' |
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
2018-02-23 11:47:17.086553: I tensorflow/tools/benchmark/benchmark_model.cc:443] Graph: [/Users/tobi/Desktop/frozen_mobilenet.pb] | |
2018-02-23 11:47:17.086832: I tensorflow/tools/benchmark/benchmark_model.cc:444] Input layers: [input_1] | |
2018-02-23 11:47:17.086842: I tensorflow/tools/benchmark/benchmark_model.cc:445] Input shapes: [1,224,224,3] | |
2018-02-23 11:47:17.086848: I tensorflow/tools/benchmark/benchmark_model.cc:446] Input types: [float] | |
2018-02-23 11:47:17.086854: I tensorflow/tools/benchmark/benchmark_model.cc:447] Output layers: [output_0] | |
2018-02-23 11:47:17.086862: I tensorflow/tools/benchmark/benchmark_model.cc:448] Num runs: [1000] | |
2018-02-23 11:47:17.086871: I tensorflow/tools/benchmark/benchmark_model.cc:449] Inter-inference delay (seconds): [-1.0] | |
2018-02-23 11:47:17.086877: I tensorflow/tools/benchmark/benchmark_model.cc:450] Inter-benchmark delay (seconds): [-1.0] | |
2018-02-23 11:47:17.086883: I tensorflow/tools/benchmark/benchmark_model.cc:452] Num threads: [-1] | |
2018-02-23 11:47:17.086888: I te |
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 | |
import urllib2, base64, syslog | |
username = "username" | |
password = "password" | |
host = "hostname.feste-ip.net" | |
url = "https://members.feste-ip.net/nic/update?hostname=%s" % (host) | |
auth = base64.b64encode('%s:%s' % (username, password)) |
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 sys | |
import StringIO | |
import os.path | |
import datetime | |
def remove_old_kernel(content, kernel_name): | |
kernel_start_pos = content.rfind("// kernel " + kernel_name + " start \n") |