<commit_before>from tim_app.models import User, Good, Request, Supply
from math import radians, cos, sin, asin, sqrt
from sms.utils import send_sms_message
import copy
from datetime import timedelta

#matches with one or more supply objects if possible, returns true on success
def find_match_for_request(rid):
    request = Request.objects.get(id = rid)

    #get all active objects from category
    s_list = Supply.objects.filter(active = True, goodName = request.goodName)

    #filter matches in radius and create a list
    supply_list = []
    for s in s_list:
        if (distance(s.location, request.location) <= (request.radius + s.radius)):
            supply_list.append(s)
	
    #if no possible matches in radius found, terminate and return false
    if len(supply_list) == 0 :
        return False
		
    # check for exact quantity matches<commit_msg>some fixes<commit_after>from tim_app.models import User, Good, Request, Supply
from math import radians, cos, sin, asin, sqrt
from sms.utils import send_sms_message
import copy
from datetime import timedelta

#matches with one or more supply objects if possible, returns true on success 
def find_match_for_request(rid):
    request = Request.objects.get(id = rid)

    #get all active objects from category
    s_list = Supply.objects.filter(active = True, goodName = request.goodName)

    #filter matches in radius and create a list
    supply_list = []
    for s in s_list:
        if (distance(s.location, request.location) <= (request.radius + s.radius)):
            supply_list.append(s)
	
    #if no possible matches in radius found, terminate and return false
    if len(supply_list) == 0 :
        return False
		
    # check for exact quantity matches
{'fraction_non_alphanumeric': 0.07407407407407407, 'fraction_numerical': 0.0011574074074074073, 'mean_word_length': 3.538057742782152, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2053158', 'n_tokens_mistral': 502, 'n_tokens_neox': 480, 'n_words': 188}