This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% extends "base.html" %} | |
{% macro ship_option(product, discount) %} | |
{% if product.ship_option_string == "pricedin" %} | |
<p class="ship_discount sml-text">FREE Shipping | |
{% if discount %} | |
<br />Save {{ ((1 - discount) * 100) | int }}% | |
{% else %} | |
<br /> | |
{% endif %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<meta http-equiv="refresh" content="0; url=http://example.com/" /> | |
</head> | |
<body></body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Testasdf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- Simplest case --> | |
{{ "images/my_image.png" | asset_url | img_tag }} | |
<!-- With alt --> | |
{{ "images/my_image.png" | asset_url | img_tag(alt="My image") }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<h1 class="my-class">Custom header</h1> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% extends "base.html" %} | |
{% macro ship_option(product, discount) %} | |
{% if product.ship_option_string == "pricedin" %} | |
<p class="ship_discount sml-text">FREE Shipping | |
{% if discount %} | |
<br />Save {{ ((1 - discount) * 100) | int }}% | |
{% else %} | |
<br /> | |
{% endif %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$.ajax({ | |
url: '/cart/add', | |
type: 'POST', | |
data: { | |
product_id: 1579, | |
term_cycles: 3, | |
'variant:Color': 'silver' | |
}, success: function(data) { | |
console.log('Cart Item ID: ' + data.id); | |
console.log('Cart size: ' + data.cart_size); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var ChatRoom = function ChatRoom(chatList, inputArea, list) { | |
var _chatList = chatList, | |
_inputText = inputArea, | |
_userList = list, | |
_nickList = []; | |
/* | |
* Handle three events from the communications layer | |
*/ | |
this.expose = { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy | |
import theano | |
import theano.tensor as T | |
def theano_softmax(): | |
x = T.dmatrix('x') | |
_y = T.nnet.softmax(x) | |
f = theano.function([x], _y) | |
return f |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sqlalchemy as sqla | |
import sqlalchemy.ext.declarative as decl | |
from .signals import signaler | |
class _hooked(object): | |
def __init__(self, validate_func, normalize_func, field_name, private_name): | |
self.validate_func = validate_func | |
self.normalize_func = normalize_func | |
self.field_name = field_name |
OlderNewer