In a large mixing bowl beat butter with an electric mixer on medium to high speed for 30 seconds. Add the sugar and vanilla; beat until combined. Beat in as much of the flour as you can with the mixer. Stir in remaining flour, the sesame seed, and the pecans or almonds. Divide dough in half. If dough is too sticky, wrap each half in parchment, waxed paper or plastic wrap and chill in the refrigerator about 1 hour or until dough is easy to handle.