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
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)"
[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:
/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
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__))
@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
@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 / 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()
# -*- 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 / 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"
)
})
{"kind": "Listing", "data": {"modhash": "0h2ailm0sf73b753219e8695a84f661c5fb5ef47350859c969", "children": [{"kind": "t3", "data": {"domain": "carlcheo.com", "banned_by": null, "media_embed": {}, "subreddit": "programming", "selftext_html": null, "selftext": "", "likes": null, "user_reports": [], "secure_media": null, "link_flair_text": null, "id": "30sz09", "gilded": 0, "archived": false, "clicked": false, "report_reasons": null, "author": "vaguepotato", "num_comments": 127, "score": 698, "approved_by": null, "over_18": false, "hidden": false, "thumbnail": "", "subreddit_id": "t5_2fwo", "edited": false, "link_flair_css_class": null, "author_flair_css_class": null, "downs": 0, "secure_media_embed": {}, "saved": false, "stickied": false, "is_self": false, "permalink": "/r/programming/comments/30sz09/24_years_ago_linus_torvalds_said_linux_is_just_a/", "name": "t3_30sz09", "created": 1427751242.0, "url": "http://carlcheo.com/fascinating-posts-from-tech-founders-who-changed-the-world", "author_flair_text": null, "