Heat the oven to 350°F. Line cupcake tin with liners.
In a medium bowl, sift together the flour, cocoa powder, baking soda, baking powder, and salt; set aside.
Melt the chocolate in the microwave according to directions on the package.
In a stand mixer with a paddle attachment or using a handheld mixer beat the butter and sugar together on medium-low speed until light and fluffy. Beat in the eggs, one at a time, mixing well after each addition, scraping the bowl as needed.
Add the vanilla, and then add the melted chocolate and mix until incorporated.Setting the mixer to low speed, gradually add half the flour mixture, followed by the buttermilk and coffee, and then the remaining flour mixture.
Beat just until combined. The batter will be thick. Scoop the batter into prepared lined tins.Bake for 15-20 minutes, or until cupcakes spring back when touched.Cool the cupcakes for 10 minutes, then remove to a wire rack to cool completely
In a food processor, process the pistachios until they become coarsely ground. Stop and scrape down the sides of the bowl. Adding the oil a little bit at a time.
Continue to blend for 15-20 minutes, stopping and scraping down the sides, until smooth and creamy. Set aside.
In a stand mixer with a paddle attachment or with an electric hand mixer, beat the butter at medium-high speed until smooth.
Add cream, vanilla, and salt. Continue to beat until incorporated.Gradually add the powdered sugar, one cup at a time until the desired consistency has been reached.
Increase the speed of the mixer to medium-high speed beat until light and fluffy.Fold the pistachio paste and food coloring (go lightly with the food coloring, or you will have a very intense colored frosting into the frosting. Mix until combined
Pipe frosting onto cupcakes and garnish with chopped pistachios.