This file contains hidden or 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
| <?php | |
| function Test() | |
| { | |
| $template_engine = TemplateEngine::get(); | |
| $subjects = App::getSubjects(); | |
| $test_results = array(); | |
| foreach($subjects as $subject) |
This file contains hidden or 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
| # Parse database configuration from $DATABASE_URL | |
| import dj_database_url | |
| DATABASES['default'] = dj_database_url.config() | |
| # Honor the 'X-Forwarded-Proto' header for request.is_secure() | |
| SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https') | |
| # Allow all host headers | |
| ALLOWED_HOSTS = ['*'] |
This file contains hidden or 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.core.wsgi import get_wsgi_application | |
| from dj_static import Cling | |
| application = Cling(get_wsgi_application()) |
This file contains hidden or 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
| <?php | |
| $test_results = array(array('sample' => 'agus', 'subject' => 'dayu', 'confidence' => '5.32442375'), | |
| array('sample' => 'chapman', 'subject' => 'dayu', 'confidence' => '431.866991'), | |
| array('sample' => 'dayu', 'subject' => 'dayu', 'confidence' => '283.407861'), | |
| array('sample' => 'alex', 'subject' => 'dayu', 'confidence' => '455.675758'), | |
| array('sample' => 'ali', 'subject' => 'dayu', 'confidence' => '150.218559'), | |
| array('sample' => 'shayan', 'subject' => 'dayu', 'confidence' => '395.017484'), | |
| array('sample' => 's1', 'subject' => 'dayu', 'confidence' => '92.1327915'), | |
| array('sample' => 's2', 'subject' => 'dayu', 'confidence' => '119.563628'), |
This file contains hidden or 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
| <?php | |
| // Given any image url, it uploads to amazon s3 | |
| function UploadImageURL() | |
| { | |
| // $image_url = (isset($_REQUEST["image_url"]) && $_REQUEST["image_url"]!=null) ? $_REQUEST["image_url"] : null; | |
| $image_url = "https://fbcdn-sphotos-a-a.akamaihd.net/hphotos-ak-prn1/t1/p526x296/1965014_10153859707455111_1422873058_n.jpg"; | |
| // $image_url = "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wCEAAMCAgMCAgMDAwMEAwMEBQgFBQQEBQoHBwYIDAoMDAsKCwsNDhIQDQ4RDgsLEBYQERMUFRUVDA8XGBYUGBIWFRQBAwQEBgUGCgYGChAODA0QFA8OEAwNDQ8QDw0ODhANEA8MDA8PDxAQFA4VDw8PDhANDQ4ODRAQDw8UDhAMDA0MDP/AABEIACwALAMBEQACEQEDEQH/xAAaAAADAAMBAAAAAAAAAAAAAAAHCAkDBQYE/8QANBAAAQMDAwMCAwUJAQAAAAAAAQIDBAUGEQAHIQgSMRNBFCJxFzJCYYEVFiM0Q1FTcpEJ/8QAGgEAAgMBAQAAAAAAAAAAAAAAAwQABQYCAf/EACsRAAEDAwIEBQUBAAAAAAAAAAEAAgMREjEEIRNBUfBxgZGhwQUUImHRsf/aAAwDAQACEQMRAD8AfZtXA0wuFnR51FKrX3jd1N29s2uXRWFqbpVFgvVCUpsZV6baCtQSPdRAwB7kjUUUO7yvW/uszeebcc1Dji1r7I8NtwmPTI/4Gkk8ADyTgFSsnydIT6hkQq4+ATmn0z5zaweJ5BF66+gLcyltQbkiINXSyhC3YkBKlyEYGThJyFeM8YGST76Wh1okdu0jompdAWD8XA9e |
This file contains hidden or 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
| <?php | |
| // Given any image url, it returns the base64 image | |
| function ParseImageURL() | |
| { | |
| // $image_url = (isset($_REQUEST["image_url"]) && $_REQUEST["image_url"]!=null) ? $_REQUEST["image_url"] : null; | |
| $image_url = "https://fbcdn-sphotos-a-a.akamaihd.net/hphotos-ak-prn1/t1/p526x296/1965014_10153859707455111_1422873058_n.jpg"; | |
| // $image_url = "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wCEAAMCAgMCAgMDAwMEAwMEBQgFBQQEBQoHBwYIDAoMDAsKCwsNDhIQDQ4RDgsLEBYQERMUFRUVDA8XGBYUGBIWFRQBAwQEBgUGCgYGChAODA0QFA8OEAwNDQ8QDw0ODhANEA8MDA8PDxAQFA4VDw8PDhANDQ4ODRAQDw8UDhAMDA0MDP/AABEIACwALAMBEQACEQEDEQH/xAAaAAADAAMBAAAAAAAAAAAAAAAHCAkDBQYE/8QANBAAAQMDAwMCAwUJAQAAAAAAAQIDBAUGEQAHIQgSMRNBFCJxFzJCYYEVFiM0Q1FTcpEJ/8QAGgEAAgMBAQAAAAAAAAAAAAAAAwQABQYCAf/EACsRAAEDAwIEBQUBAAAAAAAAAAEAAgMREjEEIRNBUfBxgZGhwQUUImHRsf/aAAwDAQACEQMRAD8AfZtXA0wuFnR51FKrX3jd1N29s2uXRWFqbpVFgvVCUpsZV6baCtQSPdRAwB7kjUUUO7yvW/uszeebcc1Dji1r7I8NtwmPTI/4Gkk8ADyTgFSsnydIT6hkQq4+ATmn0z5zaweJ5BF66+gLcyltQbkiINXSyhC3YkBKlyEYGThJyFeM8YGST76Wh1okdu0jompdAWD8X |
This file contains hidden or 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
| // | |
| // HomeViewController.m | |
| // SlidingPanels | |
| // | |
| // Created by Agus on 05/03/14. | |
| // Copyright (c) 2014 StartAppLabs. All rights reserved. | |
| // | |
| #import "HomeViewController.h" | |
| #import "DynamicTransition.h" |
This file contains hidden or 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
| {% extends "layout.html" %} | |
| {% block main_content %} | |
| <div class="test-content"> | |
| <div class="main-wrapper"> | |
| {# Slogan #} | |
| <div class="slogan-container row"> | |
| <h2 class="main-slogan">Face Crop TESTS</h2> | |
| </div> |
This file contains hidden or 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
| var face_cropper = (function(){ | |
| var crop_faces = function(rects, sc, max, imageObj, imageType){ | |
| var on = rects.length; | |
| if(on && max) | |
| { | |
| jsfeat.math.qsort(rects, 0, on-1, function(a,b){return (b.confidence<a.confidence);}) | |
| } | |
| var n = max || on; | |
| n = Math.min(n, on); |
This file contains hidden or 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
| # Download from: http://ftp.gnu.org/pub/gnu/gettext/gettext-0.18.3.2.tar.gz | |
| cd ~/Downloads | |
| tar xzvf gettext-0.18.3.2.tar.gz | |
| cd gettext-0.18.3.2 | |
| ./configure | |
| make | |
| sudo make install | |
| # If this doesn't work, then install gettext using "brew install gettext" |