Find attribute_id
SELECT * FROM eav_attribute where attribute_code = 'is_anchor'
Update all of them with anchor_id from above (usually is ID 51)
UPDATE `catalog_category_entity_int` set value = 1 where attribute_id = 51
try: | |
import numpypy as np # for compatibility with numpy in pypy | |
except: | |
import numpy as np # if using numpy in cpython | |
## Tri Diagonal Matrix Algorithm(a.k.a Thomas algorithm) solver | |
def TDMAsolver(a, b, c, d): | |
''' | |
TDMA solver, a b c d can be NumPy array type or Python list type. | |
refer to http://en.wikipedia.org/wiki/Tridiagonal_matrix_algorithm |
#!/usr/bin/env sh | |
## | |
# This is script with usefull tips taken from: | |
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
# | |
# install it: | |
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh | |
# |
import numpy as np | |
import matplotlib.pyplot as plt | |
import sys | |
def main(): | |
if len(sys.argv) == 1 or "-h" in sys.argv or "--help" in sys.argv: | |
print "python lagrange.py <x1.y1> .. <x_k.y_k>" | |
print "Example:" | |
print "python lagrange.py 0.1 2.4 4.5 3.2" |
""" | |
simple example script for running notebooks and saving the resulting notebook. | |
Usage: `execute_and_save.py foo.ipynb [bar.ipynb [...]]` | |
Each cell is submitted to the kernel, and the outputs are overwritten and | |
stored in new notebooks foo_executed.ipynb, etc. | |
""" | |
import os,sys,time |
# Assumes you have a np.array((height,width,3), dtype=float) as your HDR image | |
import numpy as np | |
f = open("xxx.hdr", "wb") | |
f.write("#?RADIANCE\n# Made with Python & Numpy\nFORMAT=32-bit_rle_rgbe\n\n") | |
f.write("-Y {0} +X {1}\n".format(image.shape[0], image.shape[1])) | |
brightest = np.maximum(np.maximum(image[...,0], image[...,1]), image[...,2]) | |
mantissa = np.zeros_like(brightest) |
#!/usr/bin/env python | |
""" | |
Convert camel-case to snake-case in python. | |
e.g.: CamelCase -> snake_case | |
Relevant StackOverflow question: http://stackoverflow.com/a/1176023/293064 | |
""" |
""" | |
Simple xml serializer. | |
@author Reimund Trost 2013 | |
Example: | |
mydict = { | |
'name': 'The Andersson\'s', | |
'size': 4, |
import functools | |
import inspect | |
import os | |
import warnings | |
class _DeprecatedDecorator(object): | |
MESSAGE = "%s is @deprecated" | |
def __call__(self, symbol): |
/* Sample data: | |
$W.spectrum_data = {"lines":[ | |
{"wavelength":842.3466875,"b":21,"g":13,"r":30,"average":21}, | |
{"wavelength":841.455655089628,"b":13,"g":5,"r":22,"average":13}, | |
{"wavelength":840.564622679257,"b":0,"g":0,"r":27,"average":9}, | |
] | |
} | |
Now, setup a Spectral Workbench macro (although we'll keep it commented out until we're ready to deploy it): |