This file contains hidden or 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 hidden or 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 hidden or 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
<ul class="list-group"> | |
<li class="list-group-item"><h4>Your Subscription(s)</h4></li> | |
{% set exists = [] %} | |
{% for sub in customer.subscriptions %} | |
{% if sub.store_id == store.id %} | |
{# This makes sure we know if we found a sub tied to the store #} | |
{% do exists.append(1) %} |
This file contains hidden or 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 hidden or 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
Python: | |
os.chdir(path) | |
cwd = os.getcwd() | |
print path | |
print cwd | |
print os.path.relpath(path, start=cwd) | |
output: | |
./themes/bold |
This file contains hidden or 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 |
This file contains hidden or 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 | |
import config | |
import time | |
def theano_softmax(): | |
x = T.fmatrix('x') | |
_y = T.nnet.softmax(x) |
This file contains hidden or 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 hidden or 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
exports.createFullPath = function createFullPath(fullPath, callback) { | |
var parts = path.dirname(path.normalize(fullPath)).split("/"), | |
working = '/', | |
pathList = []; | |
for(var i = 0, max = parts.length; i < max; i++) { | |
working = path.join(working, parts[i]); | |
pathList.push(working); | |
} |
This file contains hidden or 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 = { |
NewerOlder