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
import goslate | |
text = "Hello World" | |
language = ['fr', 'es', 'it', 'eu', 'lv', 'ja', 'ko'] | |
gs = goslate.Goslate() | |
for x in range(0,len(language)): | |
translatedText = gs.translate(text,language[x]) | |
print(translatedText) |
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 googletrans import Translator | |
translator = Translator() | |
text = 'I love you' | |
source = 'en' | |
language = ['fr', 'es', 'it', 'eu', 'lv', 'ja', 'ko'] | |
for x in range(0,len(language)): | |
translated = translator.translate(text, src=source, dest=language[x]) | |
print(translated.origin, ' -> ', translated.text) |
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
import http.client | |
import hashlib | |
import json | |
import urllib | |
import random | |
def baidu_translate(content): | |
appid = 'Your appid' | |
secretKey = 'your key' | |
httpClient = None |
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
componentWillMount() { | |
//this.getTeam('國高', 'test-01', 10, 'free_point'); | |
this.getGMdata(); | |
} | |
//GET這個GM寫了幾筆資料 | |
async getGMdata() { | |
const sessionToken = await AsyncStorage.getItem('sessionToken'); | |
const userID = await AsyncStorage.getItem('userID'); |
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
import React, { Component } from 'react'; | |
import qs from 'qs'; | |
const access_token = 'eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiI0Q0pZRFQiLCJhdWQiOiIyMjdRTk0iLCJpc3MiOiJGaXRiaXQiLCJ0eXAiOiJhY2Nlc3NfdG9rZW4iLCJzY29wZXMiOiJ3aHIgd3BybyB3c2xlIHdhY3QiLCJleHAiOjE1NDAyNjY1MjYsImlhdCI6MTUwODczNjIzNX0.ZRCT5k503Z2YRynUjTmhYKYGz8idnK9ljqweB1G_-9w'; | |
export default class App extends Component { | |
state = { | |
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
#include <stdio.h> | |
#include <omp.h> | |
#define n 32 | |
#define numiter 500 | |
float A[n+2][n+2]; | |
float B[n+2][n+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
#include <stdlib.h> | |
#define N 30; | |
#define ALL 500; | |
spinlock Arrival,Departure; | |
int count; | |
float A[N+2][N+2],B[N+2][N+2]; | |
void Barrier() | |
{ |
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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <iostream> | |
#include <time.h> | |
#include <omp.h> | |
#include <windows.h> | |
using namespace std ; |
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
#include <stdlib.h> | |
#define COUNT 100; | |
float stream Px; | |
float stream Py; | |
float stream Pz; | |
void PrtX() | |
{ | |
float Z,X,Y; |
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
#include <stdlib.h> | |
#define end 101; | |
int stream pi[5]; | |
int ci[4]={2,3,5,7}; | |
void Process(int num) | |
{ | |
int val; | |
recv(pi[num],val); |
NewerOlder