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 sys | |
import requests | |
client_id = "<YOUR_CLIENT_ID>" | |
client_secret = "<YOUR_CLIENT_SECRET>" | |
lang = "Kor" # 언어 코드 ( Kor, Jpn, Eng, Chn ) | |
url = "https://naveropenapi.apigw.ntruss.com/recog/v1/stt?lang=" + lang | |
data = open('1111.mp3', 'rb') | |
headers = { | |
"X-NCP-APIGW-API-KEY-ID": client_id, | |
"X-NCP-APIGW-API-KEY": client_secret, |
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 os | |
import sys | |
import urllib.request | |
client_id = "<YOUR_CLIENT_ID>" | |
client_secret = "<YOUR_CLIENT_SECRET>" | |
encText = urllib.parse.quote(extracted_text) | |
data = "speaker=mijin&speed=0&text=" + encText; | |
url = "https://naveropenapi.apigw.ntruss.com/voice/v1/tts" | |
request = urllib.request.Request(url) | |
request.add_header("X-NCP-APIGW-API-KEY-ID",client_id) |
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 requests | |
import uuid | |
import time | |
import base64 | |
import json | |
api_url = '<YOUR_API_URL>' | |
secret_key = '<YOUR_SECERET_KEY>' | |
# image_url = 'YOUR_IMAGE_URL' | |
image_file = 'korean.jpg' |
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 requests | |
from concurrent.futures import ThreadPoolExecutor | |
def post_url(args): | |
return requests.post(args[0], data=args[1]) | |
form_data = { | |
"foo1":"bar1", | |
"foo2":"bar2" | |
} |
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 requests | |
from concurrent.futures import ThreadPoolExecutor | |
def get_url(url): | |
return requests.get(url) | |
list_of_urls = ["https://postman-echo.com/get?foo1=bar1&foo2=bar2"]*10 | |
with ThreadPoolExecutor(max_workers=10) as pool: | |
response_list = list(pool.map(get_url,list_of_urls)) |
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 requests | |
def get_url(url): | |
return requests.get(url) | |
list_of_urls = ["https://postman-echo.com/get?foo1=bar1&foo2=bar2"]*10 | |
for url in list_of_urls: | |
print(get_url(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
<configuration> | |
<property> | |
<name>yarn.nodemanager.aux-services</name> | |
<value>mapreduce_shuffle</value> | |
</property> | |
<property> | |
<name>yarn.nodemanager.aux-services.mapreduce_shuffle.class</name> | |
<value>org.apache.hadoop.mapred.ShuffleHandler</value> | |
</property> | |
<property> |
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
//1. By id | |
var name_by_id = $('#test_id').attr('name'); | |
var class_by_id = $('#test_id').attr('class'); | |
//2. By class | |
var name_by_class = $('.test_class').attr('name'); | |
var id_by_class = $('.test_class').attr('id'); | |
//3. By name | |
var id_by_name = $('[name="test_name"]').attr('id'); | |
var class_by_name = $('[name="test_name"]').attr('class'); |
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
//1. By id | |
var name_by_id = document.getElementById("test_id").getAttribute('name'); | |
var class_by_id = document.getElementById('test_id').ClassName; | |
//2. By class | |
var name_by_class = document.getElementsByClassName('test_class')[0].getAttribute('name'); | |
var class_by_class = document.getElementsByClassName('test_class')[0].id; | |
//3. By name | |
var id_by_name = document.getElementsByName('test_name')[0].id; | |
var class_by_name = document.getElementsByName('test_name')[0].className; |
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
//1. Get a value by id | |
var value = $('#test_id').val(); | |
//2. Get a value by class | |
var value = $('.test_class').val(); | |
//3. Get a value by name | |
var value = $('input[name=test_name]').val(); |
NewerOlder