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
var bcrypt = require('bcrypt'); | |
const saltRounds = 10; | |
const myPlaintextPassword = 'thisisplaintext'; | |
bcrypt.genSalt(saltRounds, function(err, salt) { | |
bcrypt.hash(myPlaintextPassword, salt, function(err, hash) { | |
console.log(hash); | |
}) |
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
## Ignore Visual Studio temporary files, build results, and | |
## files generated by popular Visual Studio add-ons. | |
# User-specific files | |
*.suo | |
*.user | |
*.userosscache | |
*.sln.docstates | |
# User-specific files (MonoDevelop/Xamarin Studio) |
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
# you will need the library "requests" | |
#LINUX command: sudo pip install requests | |
#PC command: pip install requests | |
import requests | |
# This is the ip of the Nvidia if you are making the request while attached to the VPN | |
ipOfNvidia = "10.8.0.88:4080" | |
# First request to make a records update | |
payload = {"body":[{"topic": "record", "action":"write", "recordName": "junk/testData", "data": {"lat": 33.000, "lon": -117.000}}]} | |
request = requests.post('http://' + ipOfNvidia, json=payload) |
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 requests | |
import plotly.plotly as py | |
from time import sleep | |
from plotly.graph_objs import * | |
from datetime import datetime | |
global ipOfNvidia | |
ipOfNvidia = "http://10.8.0.2:4080" | |
payload = { | |
"body":[ |
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
#!/bin/sh | |
# Prepare to build the FTDI module the NVIDIA Jetson TX2 | |
if [ $(id -u) != 0 ]; then | |
echo "This script requires root permissions" | |
echo "$ sudo "$0"" | |
exit | |
fi | |
# Go to the kernel sources | |
cd /usr/src/linux-headers-$(uname -r) | |
# Get the kernel configuration file |
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 time import sleep | |
from threading import Thread | |
from deepstream import get, post | |
''' | |
This is example code of how can can switch threads of | |
processes running in neverending while loops, This will | |
ensure that our code always runs on startup, and uses deepstream | |
as a tool to switch our rovers processes. | |
''' |
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 numpy as np | |
from time import time | |
import os | |
import six.moves.urllib as urllib | |
import sys | |
import tarfile | |
import tensorflow as tf | |
import zipfile | |
from collections import defaultdict |
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 os, re | |
regex = r"<filename>([A-Za-z0-9()+-_ ]+)<\/filename>" | |
regex2 = r"<path>([A-Za-z0-9()+-_ /]+)<\/path>" | |
for file in os.listdir("./"): | |
if file.endswith(".xml"): | |
with open(file, 'r') as f: | |
content = f.readlines() | |
listOfLines = [] | |
replace = "" | |
for l in content: |
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 glob import glob | |
from os import rename | |
prefix = "tball" | |
count = 0 | |
for f in glob("*.jpg"): | |
# remove .jpg at the end of the filename | |
newFname = prefix + "_" + str(count).zfill(5) + ".jpg" | |
print(newFname) | |
rename(f, newFname) | |
count += 1 |
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 | |
''' | |
Richard Stanley | |
TitanRover 2017 | |
audstanley@gmail.com | |
''' | |
import requests | |
import os | |
import sys | |
import json |