Source Code for Me (s-c.me)

Allows you to paste souce code to blogs! Adapted for Twitter! Here is Search Form in case you missed your code.
Code:
Selected Language:
Show Linenumbers:
Short link for Twitter:
HTML:

HTML view:

Copy Source | Copy HTML
  1. def Run(self):
  2.     Pos = self.Pole.Mix()
  3.     ds = self.Pole.Calc(Pos) - self.Pole.CalcSelf()
  4.     if ds <  0:
  5.         self.Pole.Change(Pos)
  6.     else:
  7.         p = np.exp(- ds / self.T)
  8.         if p > rnd.random():
  9.             self.Pole.Change(Pos)
  10.         self.T = self.alpha * self.T
  11.     return self.Pole.CalcSelf()




Based on Manoli.Net's CodeFormatter. Made by Topbot (c) 2008-2018