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)
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: home-assistant/home-assistant
Commit Name: a2e45b8fdde315b756691b4ae573ad55f55dc002
Time: 2016-07-02
Author: rhooper@toybox.ca
File Name: homeassistant/components/history.py
Class Name:
Method Name: get_significant_states
Project Name: recipy/recipy
Commit Name: 27aebd9429cd624a0dada25b9685ffc7af444919
Time: 2016-09-22
Author: michaelj@epcc.ed.ac.uk
File Name: integration_test/process.py
Class Name:
Method Name: execute_and_capture