Skip to content

Instantly share code, notes, and snippets.

View peasant98's full-sized avatar

Matt Strong peasant98

View GitHub Profile

#Commands: OG Way cd ~/bebop_ws/dronet/dronet_perception/launch

roslaunch bebop_launch.launch

##Dronet Way cd Desktop/Robo/proj/bebop_ws/dronet/dronet_perception/launch

#Commands: OG Way cd ~/bebop_ws/dronet/dronet_perception/launch

roslaunch bebop_launch.launch

##Dronet Way cd Desktop/Robo/proj/bebop_ws/dronet/dronet_perception/launch

@peasant98
peasant98 / image-minifier.sh
Created December 15, 2019 20:38 — forked from dawsbot/image-minifier.sh
Lossless image compression for all images in current directory
#!/bin/bash
# Minify all jpg and png images in current directory recursively
command_exists () {
type "$1" &> /dev/null ;
}
if command_exists optipng ; then
optipng **/*.png
else
echo 'Error: optipng is not installed. If you are on a Mac, we recommend googling "homebrew Mac" and installing via brew' >&2
import smtplib
# Import smtplib for the actual sending function
# Import the email modules we'll need
from email.mime.text import MIMEText
from email.MIMEMultipart import MIMEMultipart
from email.MIMEText import MIMEText
#!/bin/bash
# comments out a line in a file.
comment () {
sed -i "/^$1/s/^/#/" $2
}
# checking if the correct directory structure exists.
DIRECTORY=$1
META=$1/Meta
def rsa(s):
e = "0x"
e += s.replace(" ", "")
rsa = e.replace('\n','')
print(rsa)
# because hex, convert from base 16 to base 10!
x = int(rsa, 16)
print("Here:")
# print the amount of digits of the integer, n, and n itself.
print(len(str(x)))
#!/bin/python3
import math
import os
import random
import re
import sys
# Complete the climbingLeaderboard function below.
def climbingLeaderboard(scores, alice):
def textEditor(arr):
word = ""
oneTwosStack = []
for i in arr:
if(i[0] == '1'):
toApp = str(i[2:])
word+=toApp
oneTwosStack.append((1, toApp))
# adding in items
elif(i[0] == '2'):
#!/bin/python3
import math
import os
import random
import re
import sys
# Complete the isBalanced function below.
def isBalanced(s):
def cubeAnalysis(cubeList):
indexMin = cubeList.index(min(cubeList))
# index of the lowest cube
first = cubeList[0:indexMin]
second = cubeList[indexMin:]
# breaking up into two separate subarrays ( image a sloped valley)
firstSort = sorted(first)
# reversing and sorting the first array
reversedFirst = firstSort[::-1]