Skip to content

Instantly share code, notes, and snippets.

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.
#!/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
@lowkeyshift
lowkeyshift / Jess_practice
Last active April 10, 2018 22:08
Jessica_code_practice
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]
@lowkeyshift
lowkeyshift / practice.py
Created January 27, 2018 00:27
Happy Place Coding :)
## Please add your code below.