Python psyco.bind() Examples
The following are 6
code examples of psyco.bind().
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example.
You may also want to check out all available functions/classes of the module
psyco
, or try the search function
.
Example #1
Source File: emake.py From emake with GNU General Public License v2.0 | 6 votes |
def _psyco_speedup(): try: import psyco psyco.bind(preprocessor) psyco.bind(configure) psyco.bind(coremake) psyco.bind(emake) #print 'full optimaze' except: return False return True #---------------------------------------------------------------------- # distribution #----------------------------------------------------------------------
Example #2
Source File: emake.py From collection with MIT License | 6 votes |
def _psyco_speedup(): try: import psyco psyco.bind(preprocessor) psyco.bind(configure) psyco.bind(coremake) psyco.bind(emake) #print 'full optimaze' except: return False return True #---------------------------------------------------------------------- # distribution #----------------------------------------------------------------------
Example #3
Source File: gamelevel.py From collection with MIT License | 5 votes |
def speedup(): try: import psyco psyco.bind(disjointset) psyco.bind(vector2d) psyco.bind(line2d) psyco.bind(savebmp) except ImportError: pass
Example #4
Source File: gobang.py From collection with MIT License | 5 votes |
def psyco_speedup (): try: import psyco psyco.bind(chessboard) psyco.bind(evaluation) except: pass return 0
Example #5
Source File: gobang.py From gobang with MIT License | 5 votes |
def psyco_speedup (): try: import psyco psyco.bind(chessboard) psyco.bind(evaluation) except: pass return 0
Example #6
Source File: __init__.py From yats with MIT License | 5 votes |
def __init__(self, iterations=1000, distance=1.0, layout=LAYOUT_SPRING): super().__init__() self.__initialised = True self.nodes = [] self.edges = [] self.root = None # Calculates positions for nodes. self.layout = layout_.__dict__[layout+"_layout"](self, iterations) self.d = node(None).r * 2.5 * distance # Hover, click and drag event handler. self.events = event.events(self, _ctx) # Enhanced dictionary of all styles. self.styles = style.styles(self) self.styles.append(style.style(style.DEFAULT, _ctx)) self.alpha = 0 # Try to specialize intensive math operations. try: import psyco psyco.bind(self.layout._bounds) psyco.bind(self.layout.iterate) psyco.bind(self.__or__) psyco.bind(cluster.flatten) psyco.bind(cluster.subgraph) psyco.bind(cluster.clique) psyco.bind(cluster.partition) psyco.bind(proximity.dijkstra_shortest_path) psyco.bind(proximity.brandes_betweenness_centrality) psyco.bind(proximity.eigenvector_centrality) psyco.bind(style.edge_arrow) psyco.bind(style.edge_label) #print "using psyco" except: pass