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
from django.db.models import Case, ExpressionWrapper, IntegerField, Q, Value, When | |
class SpecialSearch(ListAPIView): | |
model = Object | |
serializer_class = ObjectSerializer | |
def get_queryset(self, rs, value): | |
""" | |
Recipe search matching, best matching and kind of matching, | |
by filtering against `tags` query parameter in the URL. |
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
#!/usr/bin/env bash | |
# Installing Packages | |
sudo apt-get update -y -qq && sudo apt-get -y -q install linux-headers-$(uname -r) build-essential && \ | |
wget -P /tmp https://packages.chef.io/stable/ubuntu/14.04/chef-server-core_12.11.1-1_amd64.deb && \ | |
dpkg -i /tmp/chef-server-core_12.11.1-1_amd64.deb | |
sudo chown -R vagrant:vagrant /home/vagrant && mkdir /home/vagrant/certs | |
sudo chef-server-ctl reconfigure |
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
Master_list = [] | |
while True: | |
grocery = input('Please enter grocery item: ') | |
if grocery.lower() == 'exit': | |
print('You did not enter a grocery item, please try again.') | |
break | |
else: | |
Master_list = Master_list + [grocery] |
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
## Please add your code below. |