Skip to content

Instantly share code, notes, and snippets.

View elja's full-sized avatar

Alex Eliseev elja

View GitHub Profile
require 'rubygems'
require 'spork'
#uncomment the following line to use spork with the debugger
#require 'spork/ext/ruby-debug'
prefork = lambda {
ENV["RAILS_ENV"] ||= 'test'
require File.expand_path("../../config/environment", __FILE__)
context 'Product Options Deletion' do
before(:all) do
any_instance_of(Website::Site) do |klass|
stub(klass).create_default_data { true }
end
@site = FactoryGirl.create(:site)
ActsAsTenant.current_tenant = @site
end
<table class="product-summary">
<thead>
<tr><th colspan="4">Summary</th></tr>
</thead>
<tbody>
{% assign total_price = 0 %}
{% for line_item in line_items %}
{% if product.has_multiple_quantity_option? %}
<tr>
{% for choice in line_item.choices %}
<div class="product {% if product.featured %} featured {% endif %}" data-product-url="{{ product | product_url }}">
<div class="image-carousel">
{% if product.images != empty %}
<ul>
{% for image in product.images %}
<li {% if image.image_url == product.thumbnail_image.image_url %}class="start"{% endif %}><img src="{{ image.small_url }}"/></li>
{% endfor %}
</ul>
{% if product.images.size > 1 %}
<a href="javascript:void(0)" onclick="$(this).closest('.image-carousel').jcarousel('scroll', '-=1');"
#include <iostream>
#include <iomanip>
#include <stdexcept>
#include <vector>
#include <cstdlib>
#include <sstream>
#include <cstring>
#include <algorithm>
using namespace std;
class Repository {
protected:
SQLManager *dbManager = NULL;
virtual string _getTableName() = 0;
virtual vector<string> _getColumnNames() = 0;
virtual bool _insertRecord(RepositoryObject *object) = 0;
virtual bool _updateRecord(RepositoryObject *object) = 0;
virtual void _createSchema() = 0;
{% if product.has_multiple_quantity_option? %}
<table class="product-summary">
<thead>
<tr><th colspan="4">Summary</th></tr>
</thead>
<tbody>
{% assign total_price = 0 %}
{% for line_item in line_items %}
<tr>
{% for choice in line_item.choices %}
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © DonovanWall
//██████╗ ██╗ ██╗
//██╔══██╗██║ ██║
//██║ ██║██║ █╗ ██║
//██║ ██║██║███╗██║
//██████╔╝╚███╔███╔╝
//╚═════╝ ╚══╝╚══╝
//@version=5
indicator('Bot ELB Buy Sell', overlay=true, format=format.price, precision=2)
Periods = input(title='ATR Period', defval=1)
src = input(hl2, title='Source')
Multiplier = input.float(title='ATR Multiplier', step=0.1, defval=3.0)
ConfirmInterval = input.int(title='Signal Confirmaion (Milliseconds)', step=1000, defval=5000)
changeATR = input(title='Change ATR Calculation Method ?', defval=true)
showsignals = input(title='Show Buy/Sell Signals ?', defval=true)
import asyncio
import random
import faust
import sentry_sdk
import logging
import time
from scheduler.schemas import trade_schema, strategy_schema, StrategyScheduler
from scheduler.db_loader import load_strategies