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
# you have to execute this code line by line so use jupyter notebook or hydrogen inside atom editor | |
# import libraries | |
import ccxt | |
from datetime import datetime | |
# create exchange API handle | |
exchange = getattr(ccxt, 'binance')() | |
# paste in your API key and secret here (if you're afraid they're gonna get stolen, inspect the ccxt library open source code on github) | |
exchange.apiKey = '' |
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
// Related to https://issues.jenkins-ci.org/browse/JENKINS-26481 | |
abcs = ['a', 'b', 'c'] | |
node('master') { | |
stage('Test 1: loop of echo statements') { | |
echo_all(abcs) | |
} | |
stage('Test 2: loop of sh commands') { |
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 groovy.io.* | |
def listfiles(dir) { | |
dlist = [] | |
flist = [] | |
new File(dir).eachDir {dlist << it.name } | |
dlist.sort() | |
new File(dir).eachFile(FileType.FILES, {flist << it.name }) | |
flist.sort() | |
return (dlist << flist).flatten() |