- Markdown style
[](https://youtu.be/nTQUwghvy5Q)
- HTML style
<a href="http://www.youtube.com/watch?feature=player_embedded&v=nTQUwghvy5Q" target="_blank">
const url = 'YOUR_API_URL'; | |
let eventSource = null; | |
/** | |
* Generate a 2D image from a sketch | |
* @param {File} file - The sketch image file | |
* @param {string} prompt - The prompt for the image generation | |
* @param {string} negativePrompt - The negative prompt for the image generation | |
* @returns {string} the path of the generated 2D image |
public static async Task<MediaAsset> CreateGIF (Texture2D[] textures) { | |
// Make sure `textures` is not empty | |
// Make sure every texture has the same size (width and height) | |
// Make sure every texture has the `TextureFormat.RGBA32` format | |
// Create recorder | |
var width = textures[0].width; | |
var height = textures[0].height; | |
var frameRate = 5; | |
var recorder = await MediaRecorder.Create( | |
MediaFormat.GIF, |
Kyle K. | |
Kei H. | |
kahron s. | |
Alan H. | |
Ashita A. | |
Shahir A. | |
Moin B. | |
Mustafa T. | |
arib k. | |
Omar K. |
# %% | |
import replicate | |
model = replicate.models.get("prompthero/openjourney") | |
version = model.versions.get("9936c2001faa2194a261c01381f90e65261879985476014a0a37a334593a05eb") | |
PROMPT = "mdjrny-v4 style 360 degree equirectangular panorama photograph, Alps, giant mountains, meadows, rivers, rolling hills, trending on artstation, cinematic composition, beautiful lighting, hyper detailed, 8 k, photo, photography" | |
output = version.predict(prompt=PROMPT, width=1024, height=512) | |
# %% | |
# download the iamge from the url at output[0] | |
import requests |
using BlendModes; | |
using UnityEngine; | |
[RequireComponent(typeof(BlendModeEffect))] | |
public class SetTextureProperty : MonoBehaviour | |
{ | |
public Texture2D Texture; | |
[ContextMenu("Set Texture")] | |
public void SetTexture () |
{ | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Sid": "VisualEditor0", | |
"Effect": "Allow", | |
"Action": [ | |
"sagemaker:ListEndpointConfigs", | |
"sagemaker:DescribeEndpointConfig", | |
"sagemaker:ListModels", |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
namespace GoogleCloudVision { | |
[System.Serializable] | |
public class AnnotateImageRequests | |
{ | |
public List<AnnotateImageRequest> requests; |
#import <AVFoundation/AVFoundation.h> | |
extern "C" { | |
void _EnableFlashlight(bool enable) { | |
AVCaptureDevice *device = [AVCaptureDevice defaultDeviceWithMediaType:AVMediaTypeVideo]; | |
if ([device hasTorch]) { | |
[device lockForConfiguration:nil]; | |
[device setTorchMode:enable ? AVCaptureTorchModeOn : AVCaptureTorchModeOff]; | |
[device unlockForConfiguration]; |
# Read more about setting it up | |
# https://medium.com/@ljmocic/running-a-script-from-s3-on-ec2-with-7-lines-of-code-59806c07d300 | |
import boto3 | |
REGION = 'us-east-1' | |
AMI = 'ami-00b94673edfccb7ca' | |
INSTANCE_TYPE = 'm3.medium' | |
BUCKET = 'script-bucket' |