Skip to content

Instantly share code, notes, and snippets.

View crizCraig's full-sized avatar
🛰️
Journeying through levels of abstraction trying to land

Craig Quiter crizCraig

🛰️
Journeying through levels of abstraction trying to land
View GitHub Profile
@crizCraig
crizCraig / graph_losses.py
Last active March 18, 2016 00:58
plotly offline scatter
import plotly
from plotly.graph_objs import Scatter, Layout
plotly.offline.plot({
"data": [
Scatter(x=times, y=losses)
],
"layout": Layout(
title="loss over time"
)
})
# -*- coding: utf-8 -*-
import h5py
import os
import numpy as np
from random import shuffle
import shutil
from PIL import Image
SIZE = 227
@crizCraig
crizCraig / deepdrive.py
Last active November 4, 2016 21:29
DeepDrive.io image parsing
SIZE = 227
def show_image_read_from_hdf5_file(img):
from skimage.viewer import ImageViewer
img = np.array(img, dtype='u1')
img = img.transpose((1, 2, 0))
img = img[:, :, ::-1]
viewer = ImageViewer(img.reshape(SIZE, SIZE, 3))
viewer.show()
@crizCraig
crizCraig / good_files.json
Created September 16, 2016 20:57
Clean DeepDrive files
[
0,
1,
2,
3,
4,
5,
6,
10,
11,
@crizCraig
crizCraig / gtav_object_ids.txt
Created December 30, 2016 22:28
GTAV object ids
prop_a4_pile_01
prop_a4_sheet_01
prop_a4_sheet_02
prop_a4_sheet_03
prop_a4_sheet_04
prop_a4_sheet_05
prop_abat_roller_static
prop_abat_slide
prop_acc_guitar_01
prop_acc_guitar_01_d1
from __future__ import print_function
import fnmatch
import os
import sys
import shutil
# Usage:
# Copy this file into the parent directory you want to split and run it from there
CURR_DIR = dir_path = os.path.dirname(os.path.realpath(__file__))
/Game/TuningCars/Maps/Demonstration : Can't find file for asset. /Game/TuningCars/Maps/Demonstration_BuiltData
Failed to load /Game/TuningCars/Maps/Demonstration_BuiltData.Demonstration_BuiltData Referenced by PersistentLevel
CreateExport: Failed to load Outer for resource '_handbrake': BlueprintGeneratedClass /Game/TuningCars/Blueprint/DeepDriveServerProxy.DeepDriveServerProxy_C
CreateExport: Failed to load Outer for resource 'ReleaseCounter': BlueprintGeneratedClass /Game/TuningCars/Blueprint/DeepDriveServerProxy.DeepDriveServerProxy_C
CreateExport: Failed to load Outer for resource 'RequestCounter': BlueprintGeneratedClass /Game/TuningCars/Blueprint/DeepDriveServerProxy.DeepDriveServerProxy_C
CreateExport: Failed to load Outer for resource 'IsControlled': BlueprintGeneratedClass /Game/TuningCars/Blueprint/DeepDriveServerProxy.DeepDriveServerProxy_C
CreateExport: Failed to load Outer for resource 'DefaultSceneRoot': BlueprintGeneratedClass /Game/TuningCars/Blueprint/DeepDriveServerProxy.DeepDriveServerProxy
[2018.09.24-21.55.28:593][ 13]LogTemp: >>> import tensorflow
[2018.09.24-21.55.29:744][ 13]LogPython: loading flag values
[2018.09.24-21.55.29:744][ 13]LogPython:
[2018.09.24-21.55.29:745][ 13]LogPython: loading flag values
[2018.09.24-21.55.29:745][ 13]LogPython:
[2018.09.24-21.55.29:746][ 13]LogPython: reloading tf flags
[2018.09.24-21.55.29:746][ 13]LogPython:
def __log(self, verb, url, requestHeaders, input, status, responseHeaders, output):
logger = logging.getLogger(__name__)
if logger.isEnabledFor(logging.DEBUG):
if "Authorization" in requestHeaders:
if requestHeaders["Authorization"].startswith("Basic"):
requestHeaders["Authorization"] = "Basic (login and password removed)"
elif requestHeaders["Authorization"].startswith("token"):
requestHeaders["Authorization"] = "token (oauth token removed)"
elif requestHeaders["Authorization"].startswith("Bearer"):
requestHeaders["Authorization"] = "Bearer (jwt removed)"
"actor_info": {
"actor_bounds": [
[
-31.9736328125,
37456.546875,
21606.87109375
],
[
1466.918212890625,
1122.478515625,