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
WITH | |
ancesstor_taxons AS ( | |
SELECT | |
taxon.id as taxon_id, | |
taxon.taxon_type as taxon_type, | |
taxon.parent_id, | |
ancesstor.id AS ancesstor_id, | |
ancesstor.parent_id AS ancesstor_parent_id, | |
trans.name AS ancesstor_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
WITH | |
-- product with taxons | |
-- product_id, taxon_ids | |
-- 12611, 19|20 | |
product_with_taxon_ids AS ( | |
SELECT | |
pt.product_id, | |
st.taxon_type, | |
STRING_AGG( pt.taxon_id::varchar, '|' ORDER BY pt.taxon_id ASC ) AS taxon_ids, |
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
WITH | |
ancesstor_taxons AS ( | |
SELECT | |
taxon.id as taxon_id, | |
taxon.taxon_type as taxon_type, | |
taxon.parent_id, | |
ancesstor.id AS ancesstor_id, | |
ancesstor.parent_id AS ancesstor_parent_id, | |
trans.name AS ancesstor_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
curl -XPUT localhost:9200/test | |
curl -XPUT http://localhost:9200/test/data/_mapping -d '{ | |
"data" : { | |
"dynamic_templates" : [ | |
{ | |
"string_template" : { | |
"match" : "*", | |
"match_mapping_type" : "string", | |
"mapping" : { |
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 AWS from 'aws-sdk' | |
import dotenv from 'dotenv' | |
import ConfigWriter from '../config_writer' | |
import ConfigReader from '../config_reader' | |
dotenv.config() | |
// https://docs.aws.amazon.com/cli/latest/reference/ecs/register-task-definition.html | |
// https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/ECS.html | |
class EcsTask { |
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
[DEFAULT] | |
product_ranking_start = 10 | |
product_ranking_steps_down = 0.2 | |
cat_ranking_start = 10 | |
cat_ranking_steps_down = 0.2 | |
product_recommendations_campaignArn=arn:aws:personalize:us-east-2:11123456:campaign/es-test03-hrnn | |
product_rankings_campaignArn=arn:aws:personalize:us-east-2:222789:campaign/es-test03-rank | |
property1_recommendations_campaignArn=arn:aws:personalize:us-east-2:3333456:campaign/es-test03-cat-hrnn | |
property1_rankings_campaignArn=arn:aws:personalize:us-east-2:444789:campaign/es-test03-cat-rank |
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
WITH | |
shops_on_trial AS ( | |
SELECT shopify_domain | |
FROM shops | |
INNER JOIN charges on shops.id = charges.shop_id | |
WHERE charges.processor = 'trial' AND (commenced_at <= now()) | |
AND (cancelled_at IS NULL OR cancelled_at >= now()) | |
), | |
stats AS ( |
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 'package:vtenh/models/account_model.dart'; | |
import 'package:vtenh/models/base_model.dart'; | |
import 'package:vtenh/services/apis/base_resource_owner_api.dart'; | |
class AccountApi extends BaseResourceOwnerApi { | |
@override | |
bool get useJapxDecode => true; | |
AccountModel objectTransformer(Map<String, dynamic> json) { | |
return AccountModel.fromJson(json); |
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
.git | |
.gitignore | |
/doc | |
.yardoc | |
coverage | |
jsdoc | |
/tmp | |
/log | |
Dockerfile | |
Dockerfile.prod |
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
module Feed | |
class VendorProduct | |
attr_accessor :vendor | |
LIMIT = 4 | |
def initialize(vendor:, products:) | |
@vendor = vendor | |
@products = products | |
end |