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
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: superset | |
spec: | |
selector: | |
name: superset | |
type: NodePort | |
ports: | |
- port: 8080 |
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://bit.ly/2zurczJ | |
0==false // true, because false is equivalent of 0 | |
0===false // false, because both operands are of different type | |
2=="2" // true, auto type coercion, string converted into number | |
2==="2" // false, since both operands are not of same type | |
http://www.seleniumhq.org/download/ |
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{ | |
stage("a"){ | |
parallel( | |
one: { | |
echo "This is branch 1" | |
sh "sleep 10" | |
}, | |
two: { | |
echo "This is branch 2" | |
sh "sleep 2" |
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 requests | |
# get result from currencyconverterapi | |
myrequest = requests.get("https://free.currencyconverterapi.com/api/v6/convert?q=USD_ILS&compact=n&apiKey=72a1f59a5bf27c222c80") | |
# save result as json | |
result = myrequest.json() | |
# print ILS to USD currency | |
print(result['results']['USD_ILS']['val']) |
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 welcome(name): | |
print("Hello", name, "and welcome to the World Of Games(WoG). \nHere you can find many cool games to play.") | |
welcome("Mai") | |
def load_game(): | |
print("""Please choose a game to play: | |
\t1. Memory Game - a sequence of numbers will appear for 1 second and you have to guess it back | |
\t2. Guess Game - guess a number and see if you chose like the computer | |
\t3. Weather Roulette - Guess the current temperature currently in Jerusalem""") | |
while True: |
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
dict_to_test = {"name":"aviel", "age": 29, "hobbies": [1,2,3]} | |
dict_schema = {"name": type(""), "age": type(1), "hobbies": type([]), "nicknames:": type([])} | |
""" | |
function name: validator | |
input: |
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 clone https://github.com/avielb/ansible-demo.git | |
ssh-copy-id root@localhost -p 32769 | |
ssh-copy-id root@localhost -p 32768 | |
# password is screeencast | |
# https://galaxy.ansible.com/ |
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 logging | |
logging.basicConfig(filename='app.log', filemode='a', format='%(name)s - %(levelname)s - %(message)s', level=logging.INFO) | |
logging.warning('This will get logged to a file') | |
logging.info('This will get logged to a file') |
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 print_x(length): | |
i = 0 | |
j = length | |
for row in range(length + 1): | |
for col in range(length + 1): | |
if row == i and col == j: | |
print("#",end="") | |
i = i + 1 | |
j = j -1 | |
elif row == col: |
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
#!/usr/bin/env python | |
__author__ = 'khalilj' | |
__creation_date__ = '03/25/2019' | |
# A | |
x = 10 | |
y = 20 |