Skip to content

Instantly share code, notes, and snippets.

Avatar
🌻
Tending to my plants

Bee bee-san

🌻
Tending to my plants
View GitHub Profile
View cryptomath.py
def gcd(a, b):
# Return the GCD of a and b using Euclid's Algorithm
while a != 0:
a, b = b % a, a
return b
def findModInverse(a, m):
# Returns the modular inverse of a % m, which is
@bee-san
bee-san / sieve.py
Created Oct 19, 2015
Sieve of Era*
View sieve.py
def eratosthenes(n):
all = []
prime = 1
print("1, 2,")
i = 3
while (i <= n):
if i not in all:
print(i, ",")
prime += 1
j = i
View WW2_Rhien.py
__author__ = 'rhien'
#my_boo = "answer"
# not actally used in program
# weird variable names
# You declared a variable 3 times, super inefficent and not needed
# too long, line break like this
print("This is a quiz on world War II. You will learn about WW2 and "
"then you will be quized, so make sure to pay attention!")
print("For every question answer by typing yes or no and then press enter.")
View adsada
# Import smtplib for the actual sending function
import smtplib
def main():
print("/t/tWelcome to the E-mail destroyer.")
target_email = input(("Please enter the email you wish to spam: "))
infinite_or_not = input("Would you like to infinitly spam an email? YES or NO.")
if infinite_or_not.upper().startswith("Y"):
infinite_or_not = True
View gist:4851bd4836c2db314f22
#!/bin/bash
while true
do
aireplay-ng -0 5 -a 90:f6:52:c1:bb:18 wlan0
ifconfig wlan0 down
macchanger -r wlan0 | grep "New MAC"
iwconfig wlan0 mode monitor
inconfig up
iwconfig wlan0 | grep Mode
@bee-san
bee-san / gist:32bbe4d1f4af30555ae3
Created Dec 20, 2015
Checks Amazon to see if the price of a product has changed, if it's gone lower it'll email you, if not it won't do anything.
View gist:32bbe4d1f4af30555ae3
import bs4
import requests
def main():
file = open("amazon.txt", 'r')
for i in file:
print(i)
amazon_product = i
amazon_product = amazon_product.split(" ")
print(amazon_product)
@bee-san
bee-san / Amazon.py
Created Dec 24, 2015
Emails you if a product on Amazon goes on sale or gets cheaper
View Amazon.py
import bs4 as bs # beautiful soup
import requests
import json # javascript object notation
import os
import sys
#TODO Use a SQL database
# auto-key |product name | price | link
View gist:30aca5803a3edc49834d
#!/usr/bin/env python
import unicornhat as unicorn
import time, math, colorsys, random
print("Displaying the rainbows")
unicorn.brightness(0.3)
speed = 0.03
View rainbow.py
#!/usr/bin/env python
import unicornhat as unicorn
import time, math, colorsys, random
print("Displaying the rainbows")
unicorn.brightness(0.3)
speed = 0.03
@bee-san
bee-san / gist:a625863e3a88d07a6261
Created Jan 13, 2016
DOS local network using Telnet, Telnet was left to default password
View gist:a625863e3a88d07a6261
from __future__ import print_function
import os
import time
import telnetlib
import argparse
# -------------- #
HOST = "192.168.1.1"
PASSWORD = "admin"