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
1. Entity value belonging to multiple entities. caesar = food_dressing, food_salad_special. | |
App should recognizes that we want the salad | |
Expected flow: | |
user: "large caesar" | |
alexa: "Ok, I added one large caesar" | |
2. "ambiguous" entity asks for clarification | |
Expected flow: |
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
order_item_ids = [q.get('id') for q in queryset] | |
kitpart_orderitem_ids = [oid.get('item') for oid in OrderItemDetail.objects.values('item').filter(name='kitparent', id__in=order_item_ids)] |
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
<div class="dashboard-container columns_2 cf"> | |
<div class="dashboard-column-wrapper"> | |
<div class="dashboard-column ui-droppable ui-sortable"> | |
<div class="dashboard-item collapsible "> | |
<div class="dashboard-item-header ui-sortable-handle"> | |
<span class="dashboard-item-header-buttons"></span> | |
<span class="dashboard-item-header-title">test</span> | |
<div class="cf"></div> | |
</div> | |
<div class="dashboard-item-content" style="height: auto;"> |
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
$('.related-slides').slick({ | |
lazyLoad: 'ondemand', | |
slidesToShow: 4, | |
slidesToScroll: 4, | |
infinite: true, | |
dots: true, | |
responsive: [ | |
{ | |
breakpoint: 1024, | |
settings: { |
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
""" | |
You can attach **kwargs as a param to any function, it will allow passing aritrary key=value pairs to the function as parameters. | |
Its up to you to intercept the kwarg in your receiving function to make use of it, or else it's just ignored | |
""" | |
def no_kw_function(id=None, price_over=None, length=None, width=None): | |
print(id) | |
print(price_over) | |
print(length) | |
print(width) |
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
# Bad | |
class ShipForm(forms.Form): | |
printer_station = forms.CharField( | |
label=_('Print Station'), | |
widget=forms.Select(choices=get_printer_station_choices()), # Bad, this method hits the db during reload | |
required=False) | |
# Good | |
class ShipForm(forms.Form): | |
def __init__(self, *args, **kwargs): |
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 lang="en" xml:lang="en" xmlns= "https://www.w3.org/1999/xhtml"> | |
<head> | |
<meta name="viewport" content="width=device-width,initial-scale=1.0"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta charset="utf-8"> | |
<script | |
src="https://code.jquery.com/jquery-3.4.1.min.js" | |
integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" | |
crossorigin="anonymous"></script> |
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
version: "3" | |
services: | |
mariadb: | |
image: wodby/mariadb:$MARIADB_TAG | |
container_name: "${PROJECT_NAME}_mariadb" | |
stop_grace_period: 30s | |
environment: | |
MYSQL_ROOT_PASSWORD: $DB_ROOT_PASSWORD | |
MYSQL_DATABASE: $DB_NAME |
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
<?php | |
// @codingStandardsIgnoreFile | |
$databases['default']['default'] = [ | |
'database' => 'drupal', | |
'username' => 'drupal', | |
'password' => 'drupal', | |
'host' => 'db', | |
'port' => '3306', |
OlderNewer