code: def str2bin(text, max_length=30):
      if len(text) > max_length:
          raise ValueError(
              "Text can't contains more "
              "than {} symbols".format(max_length)
          )
  
      text = text.rjust(max_length)
  
      bits_list = []
      for symbol in text:
          bits = bin(ord(symbol))
          # Cut `0b` from the beggining and fill with zeros if they
          # are missed
          bits = bits[2:].zfill(8)
          bits_list.extend(map(int, bits))
  
      return list(bits_list)
  
file_path: neupy/examples/memory/password_recovery.py
imports: from __future__ import division, print_function
  import random
  import pprint
  import string
  from collections import OrderedDict
  from operator import itemgetter
  import numpy
  from tqdm import tqdm
  from neupy import algorithms
label_desc: Use image node_id 1 for calling a global function with example usage: str2bin(text, max_length) and returns: list