Skip to content

Instantly share code, notes, and snippets.

Batuhan Küçükali BatuhanKucukali

Block or report user

Report or block BatuhanKucukali

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View TranslateServiceTest.groovy
@SpringBootTest
class TranslateServiceTest extends Specification {
@Autowired
TranslateService translateService
def "translate text expected succeed"() {
when:
def result = translateService.translate("Hello World", Language.ENGLISH, Language.SPANISH)
then:
result == "Hola Mundo"
View AmazonTranslateImpl.java
@Slf4j
@Service
public class AmazonTranslateImpl implements TranslateService {
private final AwsConfig config;
private AmazonTranslate client;
public AmazonTranslateImpl(AwsConfig config) {
this.config = config;
}
View TranslateService.java
public interface TranslateService {
String translate(String text, Language sourceLang, Language targetLang);
}
View build.gradle
buildscript {
ext {
springBootVersion = '1.5.10.RELEASE'
}
repositories {
mavenCentral()
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
}
View TestSelenium.java
public class TestSelenium {
@Rule
public BrowserWebDriverContainer chrome = new BrowserWebDriverContainer()
.withDesiredCapabilities(DesiredCapabilities.chrome())
.withRecordingMode(BrowserWebDriverContainer.VncRecordingMode.RECORD_FAILING, new File("target"));
@Test
public void searchTest() {
RemoteWebDriver driver = chrome.getWebDriver();
View build.gradle
group 'seleniumvnc'
version '1.0-SNAPSHOT'
apply plugin: 'java'
sourceCompatibility = 1.8
repositories {
mavenCentral()
}
View Python Ftp
#!/usr/bin/python
# -*- coding: utf-8 -*-
import os
from ftplib import FTP
########### Local Path ####################
path = 'backup/'
########### MODIFY ########################
You can’t perform that action at this time.