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
person = {'name': 'Phill', 'age': 22} | |
print('Name: ', person.get('name')) | |
print('Age: ', person.get('age')) | |
# value is not provided | |
print('Salary: ', person.get('salary')) | |
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 ml_performance_monitoring.monitor import wrap_model | |
import numpy as np | |
from sklearn.metrics import mean_squared_error | |
from sklearn.datasets import load_boston | |
from sklearn.model_selection import train_test_split | |
import xgboost as xgb | |
boston_dataset = load_boston() | |
X, y = ( |
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
if __name__ == '__main__': | |
print_billing_doc() | |
#Вывод | |
Name Price Tax | |
Book 30 3.0 | |
Pen 5 0.5 |
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 calculate_tax(price, tax): | |
return price * tax | |
def print_billing_doc(): | |
tax_rate = 0.1 | |
products = [{'name': 'Book', 'price': 30}, | |
{'name': 'Pen', 'price': 5}] | |
# print billing header |
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
:link { | |
outline: 1px dotted blue; | |
background-color: white; | |
/* The default value of background-color is `transparent`. You need to | |
specify a different value, otherwise changes on :visited won't apply. */ | |
} | |
:visited { | |
outline-color: orange; /* Visited links have an orange outline */ | |
background-color: green; /* Visited links have a green background */ |
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
"""Pacman, классическая аркадная игра. | |
упражнения для повышения навыков | |
1. Сменить фон. | |
2. Изменить количество призраков. | |
3. Измените место запуска pacman. | |
4. Сделать призраков быстрее/медленнее. | |
5. Сделать призраков умнее. | |
""" |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>JS getComputedStyle() Demo</title> | |
<style type="text/css"> | |
.message { | |
background-color: #fff3d4; | |
border: solid 1px #f6b73c; |
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 itertools | |
import sys | |
import time | |
def spinner(seconds): | |
"""Show an animated spinner while we sleep.""" | |
symbols = itertools.cycle('-|/') | |
tend = time.time() + seconds | |
while time.time() < tend: | |
# 'r' is carriage return: return cursor to the start of the line. |
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 pop(self, key: str) -> Any: | |
"""Delete and return value at key. | |
Args: | |
key (str): Key to pop. | |
Returns: | |
Any: Popped value. | |
""" |
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 helper._get import * | |
LOGS.info("Starting...") | |
######## Connect ######## | |
try: |