This file contains 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
import cognitive_face as CF | |
import requests | |
from io import BytesIO | |
from PIL import Image, ImageDraw | |
KEY = 'ADD YOUR FACE API KEY HERE' # Replace with a valid subscription key (keeping the quotes in place). | |
CF.Key.set(KEY) | |
BASE_URL = 'https://westcentralus.api.cognitive.microsoft.com/face/v1.0/' # Replace with your regional Base URL |
This file contains 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
<html> | |
<head> | |
<style> | |
#mapid { height: 620px; } | |
</style> | |
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.3.4/dist/leaflet.css" | |
integrity="sha512-puBpdR0798OZvTTbP4A8Ix/l+A4dHDD0DGqYW6RQ+9jxkRFclaxxQb/SJAWZfWAkuyeQUytO7+7N4QKrDh+drA==" | |
crossorigin=""/> | |
<script src="https://unpkg.com/leaflet@1.3.4/dist/leaflet.js" | |
integrity="sha512-nMMmRyTVoLYqjP9hrbed9S+FzjZHW5gY1TWCHA5ckwXZBadntCNs8kEqAWdrb9O7rxbCaA4lKTIWjDXZxflOcA==" |
This file contains 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
<html> | |
<head> | |
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> | |
</head> | |
<body> | |
<div id="api-data"></div> | |
<script type="text/javascript"> | |
<!-- copy lines 1-11 of the JavaScript Jquery AJAX code given by Postman --> |
This file contains 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
<html> | |
<head> | |
<style> | |
#mapid { height: 680px; } | |
</style> | |
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.3.4/dist/leaflet.css" | |
integrity="sha512-puBpdR0798OZvTTbP4A8Ix/l+A4dHDD0DGqYW6RQ+9jxkRFclaxxQb/SJAWZfWAkuyeQUytO7+7N4QKrDh+drA==" | |
crossorigin=""/> | |
<script src="https://unpkg.com/leaflet@1.3.4/dist/leaflet.js" | |
integrity="sha512-nMMmRyTVoLYqjP9hrbed9S+FzjZHW5gY1TWCHA5ckwXZBadntCNs8kEqAWdrb9O7rxbCaA4lKTIWjDXZxflOcA==" |
This file contains 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
<html> | |
<head> | |
<!-- include references to CSS and JavaScript files --> | |
<style> | |
<!-- put css code here --> | |
</style> | |
</head> | |
<body> | |
<!-- create your map div here --> | |
<script type="text/javascript"> |
This file contains 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<style> | |
html, | |
body { | |
font-family: Arial, sans-serif; | |
height: 100%; | |
margin: 0; | |
padding: 0; |
This file contains 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<style> | |
html, | |
body { | |
font-family: Arial, sans-serif; | |
height: 100%; | |
margin: 0; | |
padding: 0; |
This file contains 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
<p id="notice"><%= notice %></p> | |
<p> | |
<strong>Title:</strong> | |
<%= @topic.title %> | |
</p> | |
<p> | |
<strong>Description:</strong> | |
<%= @topic.description %> |
This file contains 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
<%= form_for(@topic) do |f| %> | |
<% if @topic.errors.any? %> | |
<div id="error_explanation"> | |
<h2><%= pluralize(@topic.errors.count, "error") %> prohibited this topic from being saved:</h2> | |
<ul> | |
<% @topic.errors.full_messages.each do |message| %> | |
<li><%= message %></li> | |
<% end %> | |
</ul> |
This file contains 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
<h1>New Topic</h1> | |
<%= render 'form' %> | |
<%= link_to 'Back', topics_path %> |
NewerOlder