Bring a pot of salted water to a boil on medium high heat. Add the potatoes and cook until tender, a fork should easily slide in and out. Remove the potatoes with a slotted spoon or spider and drain well. Turn the pot of water down to a simmer.
In a bowl mash the potatoes well with a fork. Season with salt and pepper. Mix in the egg, rosemary, and flour until a soft dough forms. Flour the surface of your counter and flour your knife as needed.
Quarter the dough ball. Using your hands roll each quarter into even sized ropes, roughly as thick as your thumb. Using your floured knife cut about thumbnail sized pieces out of the ropes. Lightly flour the pieces.
Bring the simmering pot of water back to a boil. Add the gnocchi into the water (in batches if needed) until they start to float. Remove with a slotted spoon and drain well, then set aside.
Heat a nonstick pan over medium heat. Once hot, add the oil and butter. Saute the shallots until golden brown, add in the gnocchi and saute to get some golden brown coloring.
Remove from the heat and toss with taragon. Season with salt if needed. Serve immediately.