text
stringlengths
0
828
.. code-block:: plain
INSERT INTO `testing_table` (a_newKey,and_another,dateCreated,uniqueKey2,uniquekey1) VALUES (""cool"" ,""super cool"" ,""2016-09-14T13:17:26"" ,""burgers"" ,""cheese"") ON DUPLICATE KEY UPDATE a_newKey=""cool"", and_another=""super cool"", dateCreated=""2016-09-14T13:17:26"", uniqueKey2=""burgers"", uniqu...
...
...
""""""
log.debug('starting the ``list_of_dictionaries_to_mysql_inserts`` function')
if not len(datalist):
return ""NO MATCH""
inserts = []
for d in datalist:
insertCommand = convert_dictionary_to_mysql_table(
log=log,
dictionary=d,
dbTableName=""testing_table"",
uniqueKeyList=[],
dateModified=False,
returnInsertOnly=True,
replace=True,
batchInserts=False
)
inserts.append(insertCommand)
output = "";\n"".join(inserts) + "";""
log.debug('completed the ``list_of_dictionaries_to_mysql_inserts`` function')
return output"
4327,"def after(self):
""""""
Return a deferred that will fire after the request is finished.
Returns:
Deferred: a new deferred that will fire appropriately
""""""
d = Deferred()
self._after_deferreds.append(d)
return d.chain"
4328,"def after_response(self, request, fn, *args, **kwargs):
""""""
Call the given callable after the given request has its response.
Arguments:
request:
the request to piggyback
fn (callable):
a callable that takes at least two arguments, the request and
the response (in that order), along with any additional
positional and keyword arguments passed to this function which
will be passed along. If the callable returns something other
than ``None``, it will be used as the new response.
""""""
self._requests[id(request)][""callbacks""].append((fn, args, kwargs))"
4329,"def plot_degbandshalffill():
""""""Plot of Quasiparticle weight for degenerate
half-filled bands, showing the Mott transition""""""
ulim = [3.45, 5.15, 6.85, 8.55]
bands = range(1, 5)
for band, u_int in zip(bands, ulim):
name = 'Z_half_'+str(band)+'band'
dop = [0.5]
data = ssplt.calc_z(band, dop, np.arange(0, u_int, 0.1),0., name)
plt.plot(data['u_int'], data['zeta'][0, :, 0], label='$N={}$'.format(str(band)))
ssplt.label_saves('Z_half_multiorb.png')"
4330,"def plot_dop(bands, int_max, dop, hund_cu, name):
""""""Plot of Quasiparticle weight for N degenerate bands
under selected doping shows transition only at half-fill
the rest are metallic states""""""
data = ssplt.calc_z(bands, dop, np.arange(0, int_max, 0.1), hund_cu, name)
ssplt.plot_curves_z(data, name)"
4331,"def plot_dop_phase(bands, int_max, hund_cu):
""""""Phase plot of Quasiparticle weight for N degenerate bands
under doping shows transition only at interger filling
the rest are metallic states""""""
name = 'Z_dop_phase_'+str(bands)+'bands_U'+str(int_max)+'J'+str(hund_cu)
dop = np.sort(np.hstack((np.linspace(0.01,0.99,50),
np.arange(1./2./bands, 1, 1/2/bands))))
data = ssplt.calc_z(bands, dop, np.arange(0, int_max, 0.1), hund_cu, name)
ssplt.imshow_z(data, name)
ssplt.surf_z(data, name)"
4332,"def create_store_credit(cls, store_credit, **kwargs):
""""""Create StoreCredit
Create a new StoreCredit
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async=True
>>> thread = api.create_store_credit(store_credit, async=True)