Guest User

Untitled

a guest
May 24th, 2018
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. init()
  2.  
  3. projects_matching = []
  4.  
  5. # Find each project that matches the search criteria in the choosen fields
  6. for project in projects:
  7. if search_fields:
  8. for field in search_fields:
  9. if search in project[field]:
  10. projects_matching.append(project)
  11.  
  12. # Get rid of the projects that doesn't match the given techniques
  13. for project in projects_matching:
  14. if techniques:
  15. for technique in techniques:
  16. if technique not in project['techniques_used'].lower():
  17. projects_matching.remove(project)
  18.  
  19. # Do sorting...
  20.  
  21. return (works_ok, projects_matching)
Add Comment
Please, Sign In to add comment