Skip to content

Instantly share code, notes, and snippets.

View viswanath608's full-sized avatar
🎯
Focusing

Viswanath Keerthi viswanath608

🎯
Focusing
View GitHub Profile
@alexcasalboni
alexcasalboni / amazon-rekognition.md
Last active July 6, 2024 03:43
Amazon Rekognition - Python Code Samples

Amazon Rekognition - Python Code Samples

  1. Labels Detection
  2. Faces Detection
  3. Faces Comparison
  4. Faces Indexing
  5. Faces Search
@omurphy27
omurphy27 / eloquent-nested-orwhere-query.php
Last active July 10, 2017 13:38
Laravel 5.2 - Eloquent query with nested Where and orWhere like variables
<?php
$results = ClinicalStudy::where( function( $query ) use ( $data )
{
$query->where('brief_title', 'like', $data['query'] .'%')
->orWhere('source', 'like', $data['query'] .'%')
->orWhere('brief_summary', 'like', $data['query'] .'%')
->orWhere('detailed_description', 'like', $data['query'] .'%');
});
@fhferreira
fhferreira / haversine.php
Last active January 19, 2021 14:44
Haversine Method for model Laravel.
<?php
/*
* find the n closest locations
* @param Model $query eloquent model
* @param float $lat latitude of the point of interest
* @param float $lng longitude of the point of interest
* @param float $max_distance distance in miles or km
* @param string $units miles or kilometers
* @param Array $fiels to return
* @return array