Skip to content

Instantly share code, notes, and snippets.

@captflint
captflint / bloodsquares.py
Created January 5, 2015 20:59
bloodyboard
import sys
print('loading file')
pgnfile = open(sys.argv[1], 'rb')
glob = pgnfile.read()
print('done')
print('convertingbytes')
pgn = ''
for b in glob:
c = chr(b)
pgn += c
@captflint
captflint / pffinder.py
Created November 3, 2014 04:18
Prime factor finder
# This program takes an integer and returns it prime factors
# isprime checks whether an integer greater than 2 is prime
def isprime(candn):
half = candn / 2
divisor = 2
while divisor <= half:
if candn % divisor == 0:
return(False)
else:
@captflint
captflint / japanesecandy.md
Created August 11, 2014 02:20
Tradtitional Japanese Candy (eo to en)

Japanese Candy

Traditional Japanese Candy (wagashi) is produced from natural plant ingredients. The name of a classic wagashi is usually the name of a natural wonder or a word from a classical work of art. Candies made from other ingredients or coming from Okinawa, China, The United States, or Europe are not called wagashi, but for example Yogashi.

Ingredients

Japanese candies are made only from natural plant ingredients, based from:

  • Cane Sugar
  • Azuki beans