Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing

Ryein Goddard Goddard

🎯
Focusing
Block or report user

Report or block Goddard

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@Goddard
Goddard / oidgen.vbs
Created Jun 26, 2019
This script is a modification to the original oidgen.vb script. It adds a required DLL register and prints it to a file for easy copy pasting and saving. -------------------- Generates an object identifier (OID) using a GUID and the OID prefix 1.2.840.113556.1.8000.2554. This script contributed by Omar Sinno of Microsoft. Original - https://gall…
View oidgen.vbs
' oidgen.vbs
'
' THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
' OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR
' FITNESS FOR A PARTICULAR PURPOSE.
'
' Copyright (c) Microsoft Corporation. All rights reserved
' Improvements made by Ryein C. Goddard
'
' This script is not supported under any Microsoft standard support program or service.
View openvpnauto
#!/bin/sh
### BEGIN INIT INFO
# Provides: OpenVPN Autoconnect
# Required-Start: $local_fs $remote_fs $network
# Required-Stop: $local_fs $remote_fs $network
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: OpenVPN Autoconnect
# Description: OpenVPN Autoconnect
### END INIT INFO
@Goddard
Goddard / staircase.py
Created Apr 15, 2019
hankerrank staircase example python
View staircase.py
#!/bin/python3
import math
import os
import random
import re
import sys
# Complete the staircase function below.
def staircase(n):
@Goddard
Goddard / diagonalDifference.py
Created Apr 15, 2019
something I did for hankerrank
View diagonalDifference.py
#!/bin/python3
import math
import os
import random
import re
import sys
# Complete the diagonalDifference function below.
def diagonalDifference(arr):
View detect-lane-lines-simple.py
def draw_lines(img, lines, color=[255, 0, 0], thickness=10):
"""
NOTE: this is the function you might want to use as a starting point once you want to
average/extrapolate the line segments you detect to map out the full
extent of the lane (going from the result shown in raw-lines-example.mp4
to that shown in P1_example.mp4).
Think about things like separating line segments by their
slope ((y2-y1)/(x2-x1)) to decide which segments are part of the left
line vs. the right line. Then, you can average the position of each of
@Goddard
Goddard / publish_video.py
Created Nov 19, 2017 — forked from wngreene/publish_video.py
Publish a video as ROS messages.
View publish_video.py
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright 2016 Massachusetts Institute of Technology
"""Publish a video as ROS messages.
"""
import argparse
@Goddard
Goddard / helper.py
Created Oct 15, 2017
function from helper
View helper.py
def gen_test_video(sess, logits, keep_prob, input_image, clip, image_shape): #test_image
# image = scipy.misc.imresize(scipy.misc.imread(test_image), image_shape)
image = clip
im_softmax = sess.run(
[tf.nn.softmax(logits)],
{keep_prob: 1.0, input_image: [image]})
im_softmax = im_softmax[0][:, 1].reshape(image_shape[0], image_shape[1])
segmentation = (im_softmax > 0.5).reshape(image_shape[0], image_shape[1], 1)
mask = np.dot(segmentation, np.array([[0, 255, 0, 127]]))
@Goddard
Goddard / main.py
Created Oct 15, 2017
main network file for semantic segmentation
View main.py
import os.path
import tensorflow as tf
import helper
import freeze
import warnings
from distutils.version import LooseVersion
import project_tests as tests
@Goddard
Goddard / video.py
Created Oct 15, 2017
Trying to use a pre-existing model and my additions after saving then restoring and run on video
View video.py
import os.path
import tensorflow as tf
import helper
import cv2
from distutils.version import LooseVersion
# Check TensorFlow Version
assert LooseVersion(tf.__version__) >= LooseVersion('1.0'), 'Please use TensorFlow version 1.0 or newer. You are using {}'.format(tf.__version__)
print('TensorFlow Version: {}'.format(tf.__version__))
View formulagraphing.py
import numpy as np
import matplotlib.pyplot as plt
def graph(formula, x_range):
x = np.array(x_range)
y = formula(x)
plt.plot(x, y)
plt.show()
def my_formula(x):
You can’t perform that action at this time.