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 pandas as pd | |
from sqlalchemy import create_engine | |
def test_create_excel(): | |
# create some data | |
data = {'product_name': ['laptop', 'printer', 'tablet', 'desk', 'chair'], | |
'price': [1200, 150, 300, 450, 200] | |
} | |
# make it a data frame |
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
package main | |
import ( | |
"fmt" | |
"log" | |
"net/http" | |
"net/http/httputil" | |
) |
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
@Scheduled(fixedRate = 5000) | |
public void doSomething() throws Exception { | |
log.info("Scheduled task run..."); | |
File resource = new ClassPathResource("static/index.html").getFile(); | |
String time = String.valueOf(Instant.now().toEpochMilli()); | |
StringBuilder sb = new StringBuilder(); | |
sb.append("<p>"); | |
sb.append(time); | |
Files.write(resource.toPath(), sb.toString().getBytes()); |
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
# This will rsync the contents of your build directory to the target server | |
image: alpine:latest | |
pipelines: | |
default: | |
- step: | |
script: | |
- apk add --update openssh-client rsync sshpass | |
- chmod -R 755 * | |
- sshpass -p "$FTP_PASSWORD" rsync -v -e "ssh -p $FTP_PORT" -arz --exclude='.git/' * $FTP_USER@$FTP_SERVER:$FTP_PATH |
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
f |