網路上的window.speechSynthesis
教學主要都只有說切換指定語言
像是這樣就能切換成中文語音:
const synth = window.speechSynthesis;
const speak = (msg) => {
from typing import Union, List | |
from dataclasses import dataclass | |
class Validations: | |
def __post_init__(self): | |
"""Run validation methods if declared. | |
The validation method can be a simple check | |
that raises ValueError or a transformation to |
# ----------------------------- | |
# USAGE | |
# ----------------------------- | |
# chmod +x mrcnn_continous_run.sh | |
# source mrcnn_continous_run.sh | |
# | |
# DESCRIPTION: | |
# Allows matterport's MRCNN to run in sections so that every few epochs it re-executes | |
# and, therefore, resets the memory solving provisionally the memory leak issue. | |
# |
""" | |
Mask R-CNN | |
The main Mask R-CNN model implemenetation. | |
Copyright (c) 2017 Matterport, Inc. | |
Licensed under the MIT License (see LICENSE for details) | |
Written by Waleed Abdulla | |
""" | |
# change related API to make this file run mark rcnn demo competible |
#! /bin/bash | |
# NEWLY ADDED BACKUP FUNCTIONALITY IS NOT FULLY TESTED YET, USE WITH CARE, ESPECIALLY DELETION | |
# Developed for DSM 6 - 7.0.1. Not tested on other versions. | |
# Steps to install | |
# Save this script in one of your shares | |
# Edit it according to your requirements | |
# Backup /usr/syno/share/nginx/ as follows: | |
# # cd /usr/syno/share/ | |
# # tar cvf ~/nginx.tar nginx |
{0: u'__background__', | |
1: u'person', | |
2: u'bicycle', | |
3: u'car', | |
4: u'motorcycle', | |
5: u'airplane', | |
6: u'bus', | |
7: u'train', | |
8: u'truck', | |
9: u'boat', |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<title>A simple clock</title> | |
</head> | |
<body translate="no" > |
# First, you should install flickrapi | |
# pip install flickrapi | |
import flickrapi | |
import urllib | |
from PIL import Image | |
# Flickr api access key | |
flickr=flickrapi.FlickrAPI('c6a2c45591d4973ff525042472446ca2', '202ffe6f387ce29b', cache=True) |
// Find a "pivot" element in the array to compare all other | |
// elements against and then shift elements before or after | |
// pivot depending on their values | |
function QuickSort(arr, left = 0, right = arr.length - 1) { | |
let len = arr.length, | |
index | |
if(len > 1) { | |
index = partition(arr, left, right) |