Skip to content

Instantly share code, notes, and snippets.

View SammyHerring's full-sized avatar

Sammy Herring SammyHerring

View GitHub Profile
https://bootstrap.pypa.io/get-pip.py

Keybase proof

I hereby claim:

  • I am sammyherring on github.
  • I am sammy_herring (https://keybase.io/sammy_herring) on keybase.
  • I have a public key ASDGryoZRHB7yJyEruFvhAHbKgQ40gY2AZCIl7AY72su6go

To claim this, I am signing this object:

@SammyHerring
SammyHerring / kruskal.py
Created October 19, 2017 12:59
Kruskal's Algorithm to find minimum spanning tree.
parent = dict()
rank = dict()
def make_set(vertice):
parent[vertice] = vertice
rank[vertice] = 0
def find(vertice):
if parent[vertice] != vertice:
parent[vertice] = find(parent[vertice])
@SammyHerring
SammyHerring / LIFO FIFO Sorter.py
Last active March 22, 2016 10:24
Stack (LIFO) and Queue (FIFO) Algorithmic Sorter
### Lists as Stacks (LIFO)
stack = ["a", "b", "c"]
# add an element to the end of the list
stack.append("e")
stack.append("f")
print (stack)
# pop operation
stack.pop()
print (stack)
# pop operation
@SammyHerring
SammyHerring / Sorting_Algorithms.py
Created February 1, 2016 10:59
Python-based sorting algorithm for bubble sorting and insertion sorting.
#Import Random Module for Array Generation
import random
#BubbleSort Algorithm for given array in parameters
def bubbleSort(listsort):
for num in range(len(listsort)-1,0,-1):
for i in range(num):
if listsort[i]>listsort[i+1]:
x = listsort[i]
listsort[i] = listsort[i+1]
@SammyHerring
SammyHerring / Webmin Setup on RPi
Last active August 13, 2020 01:27
Raspberry Pi Webmin Server Setup, including dependencies.
sudo groupadd -f -g33 www-data
sudo apt-get update
sudo apt-get install apache2 php5 libapache2-mod-php5
sudo apt-get install mysql-server mysql-client php5-mysql
sudo apt-get install phpmyadmin
sudo apt-get install perl libnet-ssleay-perl openssl libauthen-pam-perl libpam-runtime libio-pty-perl apt-show-versions python
mkdir webmin
cd webmin
wget http://prdownloads.sourceforge.net/webadmin/webmin-1.870.tar.gz
@SammyHerring
SammyHerring / cmd_starter.bat
Created January 8, 2016 20:05
Command Prompt Window Opener
@ECHO OFF
start
END