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 azure.cognitiveservices.vision.customvision.training import training_api | |
| from azure.cognitiveservices.vision.customvision.training.models import ImageUrlCreateEntry | |
| from azure.cognitiveservices.vision.customvision.prediction import prediction_endpoint | |
| from azure.cognitiveservices.vision.customvision.prediction.prediction_endpoint import models | |
| from flask import Flask, request, jsonify | |
| from datetime import datetime | |
| app = Flask(__name__) |
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 azure.cognitiveservices.vision.customvision.training import training_api | |
| from azure.cognitiveservices.vision.customvision.training.models import ImageUrlCreateEntry | |
| from azure.cognitiveservices.vision.customvision.prediction import prediction_endpoint | |
| from azure.cognitiveservices.vision.customvision.prediction.prediction_endpoint import models | |
| import os | |
| import sys | |
| import json, requests | |
| import time |
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
| public BufferedImage rotate(BufferedImage image, int angleDegrees) { | |
| double angle = Math.toRadians(angleDegrees); | |
| double sin = Math.abs(Math.sin(angle)), cos = Math.abs(Math.cos(angle)); | |
| int w = image.getWidth(), h = image.getHeight(); | |
| int neww = (int)Math.floor(w*cos+h*sin), newh = (int) Math.floor(h * cos + w * sin); | |
| GraphicsConfiguration gc = getGraphicsConfiguration(); | |
| BufferedImage result = gc.createCompatibleImage(neww, newh, Transparency.TRANSLUCENT); | |
| Graphics2D g = result.createGraphics(); | |
| g.translate((neww - w) / 2, (newh - h) / 2); | |
| g.rotate(angle, w / 2, h / 2); |
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
| private void ClearFacebookCookies() | |
| { | |
| LoadCompletedEventHandler loadCompleted = null; | |
| WebBrowser browser = new WebBrowser(); | |
| loadCompleted = (sndr, evt) => | |
| { | |
| if ( | |
| browser.SaveToString().Contains("logout_form")) | |
| { | |
| browser.InvokeScript("eval", "document.forms['logout_form'].submit();"); |