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
print("Hello world!") | |
# if statement | |
x = 1 | |
if x == 1: | |
print("x is 1") | |
my_integer = 7 | |
print(my_integer) |
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
https://gist.github.com/avielb/98393e1fa37c6a66be1df34be68087d3 | |
# Conditionals | |
isTrue = False | |
a = 2 | |
b = 2.5 | |
strOne = "One" | |
strThree = "Three" | |
if a < b: |
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
def fib(n): # write Fibonacci series up to n | |
a, b = 0, 1 | |
while b < n: | |
print(b) | |
a, b = b, a+b | |
def fib2(n): # return Fibonacci series up to n | |
result = [] | |
a, b = 0, 1 | |
while b < n: |
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
from datetime import datetime | |
from time import sleep | |
sleep(10) | |
print(datetime.now()) | |
#read_my_contents.txt | |
''' | |
this file has contents | |
and rows | |
and characters than can be |
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
from selenium import webdriver | |
from time import sleep | |
driver = webdriver.Chrome(executable_path="c:/chromedriver.exe") | |
driver.get("https://www.google.com") | |
for i in range(20): | |
driver.refresh() | |
sleep(2) | |
driver.close() | |
from selenium import webdriver |
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
from os import system, name | |
def screen_cleaner(): | |
if name == 'nt': | |
system("cls") | |
else: | |
pass | |
system("clear") |
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
node("slave01") { | |
stage("build"){ | |
sh "date" | |
//bat "time /T" | |
} | |
} | |
node("slave01") { | |
stage("build"){ | |
echo "Building Application" |
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
# git download | |
# https://linode.com/docs/development/version-control/how-to-install-git-on-linux-mac-and-windows/ | |
# git config | |
git config --global user.name "avielb" | |
git config --global user.email "aviel33@gmail.com" | |
# from git bash | |
mkdir my-first-project | |
cd my-first-project |
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
pipeline { | |
agent any | |
stages { | |
stage("checkout"){ | |
steps{ | |
git "https://github.com/avielb/work-with-github.git" | |
} | |
} | |
stage("run something"){ | |
steps{ |
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
properties([parameters([string(defaultValue: 'default value', description: '', name: 'VAR1', trim: false)]), | |
pipelineTriggers([pollSCM('*/2 * * * *')])]) | |
pipeline { | |
agent any | |
stages { | |
stage("checkout"){ | |
steps{ | |
git "https://github.com/avielb/work-with-github.git" | |
} | |
} |