Skip to content

Instantly share code, notes, and snippets.

@derv82
derv82 / palin.py
Created August 28, 2013 04:52
Count the number of palindromes that appear in a string
#!/usr/bin/python
'''
Count number of palindromes that appear in a string
'''
from sys import argv
def count(drome):
total = 0
@derv82
derv82 / Kai32.bas
Created February 12, 2013 08:03
VB6 module for "interacting" with America Online (AOL). Developed between 1998-2000 when I was 15.
Attribute VB_Name = "Kai32"
'-=====================================================-
' -= +------------------------------------------------+ =-
' -= | |\ =-
' -= | |¯¯|\ |¯¯|\ |¯¯|\ |¯¯¯¯¯¯|\ |¯¯¯¯¯¯|\ |\\ =-
' -= | | |\/ /\| |__|\||__|| |\||___ |\| |\\| =-
' -= | | |/ /\/ |¯¯¯¯¯|\ \\\\| \\|¯ |\| /¯¯___/\| |\\| =-
' -= | | /\/ | |\||¯¯|\ |¯¯|| |\|| ¯¯¯|\ |\\| =-
' -= | | \/ | | |\|| |\||______|\||______|\| |\\| =-
' -= | | |\ \ | |\|| |\| \\\\\\\\| \\\\\\\\| |\\| =-
@derv82
derv82 / average.py
Created February 16, 2012 19:39
Scripts for generating the low-order bits of an SHA1 hash.
#!/usr/bin/python
"""
Receives 2 command-line arguments:
* Number of low-order bits to match
* Length of time to run for (in seconds)
Executes for a given time, generating random SHA1 hashes,
and counting how many times the low-order bits match the "z".