5b2766aae94c0615aef2c8d6ac178428e6d28745,pymc/database/mysql.py,Trace,_initialize,#Trace#Any#,26

Before Change


        self._trace = squeeze(zeros((self.update_interval, size), "f"))
        self.current_trace = 1
        try:
            query = "create table %s (recid int(11) NOT NULL auto_increment PRIMARY KEY, trace int(5), %s FLOAT)" % (self.obj.name, " FLOAT, ".join(["v%s" % (x+1) for x in range(size)]))
            self.db.cur.execute(query)
        except Exception:
            self.db.cur.execute("SELECT MAX(trace) FROM %s" % self.obj.name)

After Change


        
        try:
            // Try and create database with model name
            self.cur.execute("CREATE DATABASE %s" % dbname)
        except Exception:
            // If already exists, switch to database
            self.cur.execute("USE %s" % dbname)
        
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: pymc-devs/pymc3
Commit Name: 5b2766aae94c0615aef2c8d6ac178428e6d28745
Time: 2008-07-20
Author: fonnesbeck@15d7aa0b-6f1a-0410-991a-d59f85d14984
File Name: pymc/database/mysql.py
Class Name: Trace
Method Name: _initialize


Project Name: probcomp/bayeslite
Commit Name: d137ae8f6e210258a5d6d5925289c15cf07c3be9
Time: 2015-08-27
Author: axch@mit.edu
File Name: src/geweke_testing.py
Class Name:
Method Name: create_geweke_chain_generator


Project Name: probcomp/bayeslite
Commit Name: d137ae8f6e210258a5d6d5925289c15cf07c3be9
Time: 2015-08-27
Author: axch@mit.edu
File Name: src/geweke_testing.py
Class Name:
Method Name: create_prior_gen